OpenTelemetry Metric Gauge negative metric value? #10929
bobby-driggs
started this conversation in
General
Replies: 2 comments
-
Hello @bobby-driggs, |
Beta Was this translation helpful? Give feedback.
0 replies
-
cc @JamesNK |
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.
-
I have a situation where I was attempting to implement a "stoplight" style gauge. where "red" would be -1, "yellow" would be 0, and "green" would be 1.
I noticed on the .NET Aspire Dashboard, this metric never shows a -1. It would appear that any negative value is automatically dropped? I dont see it on the Graph or the Table view.
I confirmed via the Otel Console exporter that the value that is being captured is a negative value - including two different tags:
Metric Name: sessions.state
(2025-08-12T15:12:06.4896761Z, 2025-08-12T15:14:54.5938572Z] session_id: Tag1LongGauge
Value: -1
Instrumentation scope (Meter):
Name: Service.Services.SessionStateService
Resource associated with Metric:
service.name: monitor-service
service.instance.id: npncyrgw
telemetry.sdk.name: opentelemetry
telemetry.sdk.language: dotnet
telemetry.sdk.version: 1.12.0
(2025-08-12T15:12:06.4896761Z, 2025-08-12T15:14:54.5938572Z] session_id: Tag2LongGauge
Value: 1
Instrumentation scope (Meter):
Name: Service.Services.SessionStateService
Resource associated with Metric:
service.name: monitor-service
service.instance.id: npncyrgw
telemetry.sdk.name: opentelemetry
telemetry.sdk.language: dotnet
telemetry.sdk.version: 1.12.0
Searching online, it seems that negative values should be something that is supported for Gauging. Is there a way to get this to work with the Aspire Dashboard?
EDIT TO ADD:
It also seems like the Histogram metric is capped to 10,000 ? Any way to give ranges to these for Aspire?
Beta Was this translation helpful? Give feedback.
All reactions