Histogram View with custom buckets and custom exporter #2654
Replies: 3 comments 4 replies
-
@mohnishkodnani There are unit-tests for validating custom buckets - . If that helps troubleshoot? |
Beta Was this translation helpful? Give feedback.
4 replies
-
@lalitb see if this helps. Build Commands
When I run the main program. ❯ ./metrics_opentelemetry_exe
0,5,10,25,50,75,100,250,500,750,1000,2500,5000,7500,10000,
# HELP target Target metadata
# TYPE target gauge
target_info{service_name="unknown_service",telemetry_sdk_language="cpp",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="1.15.0"} 1 1715143666951
# HELP my_histogram my histogram to test
# TYPE my_histogram histogram
my_histogram_count 2 1715143666951
my_histogram_sum 30 1715143666951
my_histogram_bucket{le="0"} 0 1715143666951
my_histogram_bucket{le="5"} 0 1715143666951
my_histogram_bucket{le="10"} 1 1715143666951
my_histogram_bucket{le="25"} 2 1715143666951
my_histogram_bucket{le="50"} 2 1715143666951
my_histogram_bucket{le="75"} 2 1715143666951
my_histogram_bucket{le="100"} 2 1715143666951
my_histogram_bucket{le="250"} 2 1715143666951
my_histogram_bucket{le="500"} 2 1715143666951
my_histogram_bucket{le="750"} 2 1715143666951
my_histogram_bucket{le="1000"} 2 1715143666951
my_histogram_bucket{le="2500"} 2 1715143666951
my_histogram_bucket{le="5000"} 2 1715143666951
my_histogram_bucket{le="7500"} 2 1715143666951
my_histogram_bucket{le="10000"} 2 1715143666951
my_histogram_bucket{le="+Inf"} 2 1715143666951 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Found a problem in meter_selector ( variable shadow was creating it with the wrong name. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a custom http server and via that I can create an endpoint where metrics would be exposed. I just want to expose the metrics in prometheus format. I followed the example in another discussion. However, in my case when I serialize this, I am not seeing the view attached to the histogram aggregation config take effect and wanted to see what i am doing wrong.
Some classes
Create histogram function and export function
Custom exporter
otel_registry class constructor
I see the default buckets but not the one I passed into the aggregation config.
Beta Was this translation helpful? Give feedback.
All reactions