feat: add synchronous gauge
Description:
Add simple gauge metrics that only record last value of recording.
Closes https://github.com/open-telemetry/opentelemetry-ruby/issues/1704
TODO:
- Replace the default aggregation with last_value once this pull request is merged.
- Update the test case to better represent how a gauge should behave differently from a counter.
- Update the metrics exporter to include the gauge type.
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the keep label to hold stale off permanently, or do nothing. If you do nothing this pull request will be closed eventually by the stale bot
I'd like to make my interest in this known. I'm in the process of moving all my production applications from Datadog to self-hosted Signoz, which rely on OTel providers. We currently have multiple areas where we report current state of things (such as background queue size and latency) via gauge metrics. Without this Gauge metric, I'm not able to complete the migration. So would be very keen to see this completed in a future release.
Updated the aggregation to last value. Updated the test case. Will work on otlp exporter once this pr get review and merge