From 2a787a6711ee84c3b551ff8cab4dc70ae30a09dd Mon Sep 17 00:00:00 2001 From: jacobrein Date: Thu, 19 Dec 2024 12:05:51 -0700 Subject: [PATCH] Fix: Update tracing attributes to metrics This commit updates the tracing attributes used in the UpdateChecker to use metrics instead of attributes. - Changes the `sourceSize` and `updateCheckSize` attributes to metrics using `putMetric` instead of `putAttribute`. - Updates the data type of the metrics to `Long`. --- .../java/com/programmersbox/uiviews/checkers/UpdateChecker.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UIViews/src/main/java/com/programmersbox/uiviews/checkers/UpdateChecker.kt b/UIViews/src/main/java/com/programmersbox/uiviews/checkers/UpdateChecker.kt index 03872569..ee168476 100644 --- a/UIViews/src/main/java/com/programmersbox/uiviews/checkers/UpdateChecker.kt +++ b/UIViews/src/main/java/com/programmersbox/uiviews/checkers/UpdateChecker.kt @@ -142,7 +142,7 @@ class UpdateFlowWorker( val sourceSize = sourceRepository.apiServiceList.size //TODO: Add some tracing metrics - putAttribute("sourceSize", sourceSize.toString()) + putMetric("sourceSize", sourceSize.toLong()) // Getting all recent updates val newList = list.intersect( @@ -177,7 +177,7 @@ class UpdateFlowWorker( ) { o, n -> o.url == n.url } .distinctBy { it.url } - putAttribute("updateCheckSize", newList.size.toString()) + putMetric("updateCheckSize", newList.size.toLong()) // Checking if any have updates println("Checking for updates")