opentelemetry-java-examples icon indicating copy to clipboard operation
opentelemetry-java-examples copied to clipboard

Unable to send custom metrics using otel Java Agent.

Open rahul-narkhede opened this issue 9 months ago • 2 comments

I have a java servlet application running via otel agent in tomcat server. I can see the traces and default metrics created by application coming into my collector and eventually into datadog.

However, I wanted to add some custom metric Histograms. So, I created the meter object using GlobalOpenTelemetry

Meter meter = GlobalOpenTelemetry.getMeter("")
LongHistogram myhistogram =  meter.histogramBuilder(...)
....

When I set the -Dotel.metrics.exporter=otlp,logging , I can see the metric value logged on my console, but nothing shows up on collector or datadog.

Any help in this matter is appreciated.

rahul-narkhede avatar May 14 '24 02:05 rahul-narkhede