msbukal commented on a change in pull request #13792:
URL: https://github.com/apache/beam/pull/13792#discussion_r564130895



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java
##########
@@ -1556,10 +1571,16 @@ public SearchResourcesJsonString(ValueProvider<String> 
fhirStore) {
       /** DoFn for searching messages from the Fhir store with error handling. 
*/
       class SearchResourcesFn extends DoFn<KV<String, Map<String, T>>, 
JsonArray> {
 
-        private Distribution searchLatencyMs =
-            Metrics.distribution(SearchResourcesFn.class, 
"fhir-search-latency-ms");
-        private Counter failedSearches =
-            Metrics.counter(SearchResourcesFn.class, "failed-fhir-searches");
+        private final Counter SEARCH_RESOURCE_ERRORS =
+            Metrics.counter(
+                SearchResourcesFn.class, BASE_METRIC_PREFIX + 
"search_resource_error_count");
+        private final Counter SEARCH_RESOURCE_SUCCESS =
+            Metrics.counter(
+                SearchResourcesFn.class, BASE_METRIC_PREFIX + 
"search_resource_success_count");
+        private final Distribution SEARCH_RESOURCE_LATENCY_MS =

Review comment:
       Ah I see, these fields can't be static because of the template <T> (keep 
going round & round in errors due to this) which means that the metric fields 
can't be static.
   
   I've renamed them.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to