How to build Metrics using OpenTelemetry SDK? #5274
-
Hey Team, I've just started my journey with OpenTelemetry. My basic Objective is to get the Metrics for no. of successful & failed operations. Que 1: does below piece of code is correct as per my expectations?
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
It doesn't look like you're recording any of those in your metrics, so I wouldn't expect them to be there. The SDK does not automatically apply span attributes to metrics. |
Beta Was this translation helpful? Give feedback.
-
the histogram aggregations usually include the |
Beta Was this translation helpful? Give feedback.
-
Got it, I was mixing up e.g.
|
Beta Was this translation helpful? Give feedback.
Got it, I was mixing up
TracerProvider
,Span
&Histogram
where I suppose to only instantiate 2counter
instances and have to send it toOtl-collector
e.g.