opencensus-java icon indicating copy to clipboard operation
opencensus-java copied to clipboard

BOOL Gauge Type

Open dansiviter opened this issue 6 years ago • 5 comments

Is your feature request related to a problem? If so, please describe it.

I'd like to be able to monitor a boolean. This is useful for simple up/down metrics such a health checks.

Describe the solution you'd like.

The ability to create a Boolean Gauge which takes simply true/false. Stackdriver has a specific BOOL type for this. It appears for SignalFX and Prometheus a Gauge which just accepts 1/0 would suffice.

Describe alternatives you've considered.

Using a Long Gauge as a hack but not ideal for Stackdriver.

Additional context.

Add any other context or screenshots about the feature request here.

dansiviter avatar Sep 09 '19 10:09 dansiviter

Please file this feature request to https://github.com/open-telemetry/opentelemetry-specification. We'd like to be consistent with all language implementations when it comes to new APIs.

songy23 avatar Sep 09 '19 16:09 songy23

@dansiviter I think the new proposed idea coming from OpenMetrics is to support enums which probably can be very close to this and maybe more generic, a Boolean is just an enum with two values.

bogdandrutu avatar Sep 09 '19 16:09 bogdandrutu

Still finding my feet with OpenTelemetry/OpenMetrics so apologies. Sounds promising so I'll take a look if it fits my use-case.

dansiviter avatar Sep 09 '19 19:09 dansiviter

@dansiviter let me know if that fits your use-case, and if it does then I would move forward to push to that support in OpenTelemetry/OpenCensus.

bogdandrutu avatar Sep 09 '19 19:09 bogdandrutu

See https://github.com/OpenObservability/OpenMetrics/pull/126/files#diff-d1792782ae179ab49b581de250c5def2R240

bogdandrutu avatar Sep 09 '19 19:09 bogdandrutu