-
Hello 👋 We are implementing metrics collection using Opentelemetry Java SDK. I wanted to confirm that my understanding of using the SDK is correct. First here is a thread from otel-specification board which includes our rough class diagram. Basically we use SDK Provider and Otlp Grpc Exporter. Our app is written in Scala, but I think it is comprehensible: case TimerMetric(metricName, labels, duration) =>
val timerRecord = meter
.longValueRecorderBuilder(metricName.value)
.setUnit("Milliseconds")
.build()
timerRecord.record(duration.toMillis, labelifyAttributes(labels)) ☝️ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This looks fine (although an older version of the API... ValueRecorder has been replaced by Histogram in the stable version of the API). But, a lot of it depends on how you've configured the SDK that backs the API calls. |
Beta Was this translation helpful? Give feedback.
This looks fine (although an older version of the API... ValueRecorder has been replaced by Histogram in the stable version of the API).
But, a lot of it depends on how you've configured the SDK that backs the API calls.