-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Synchronous Gauge instrument to the metrics API #4296
Comments
Hey @pichlermarc, is this up for grabs? I can take this up. I think the implementation could look similar to other SyncInstruments? export class GaugeInstrument extends SyncInstrument implements Gauge {
record(value: number, attributes?: MetricAttributes, ctx?: Context): void {
this._record(value, attributes, ctx);
}
} |
It's yours @mohitk05 🙂 Yes, implementation would look similar, however, you'll need to duplicate the (currently non-existent) Gauge interface in the SDK as we can't use types that are not available in earlier API versions. The SDK is backwards compatible with the API, so it can't use any types that were added after its initial release. |
Anyone know of a workaround for now? |
Using an |
Apologies for the delay here, seems like @clintonb has implemented this. Please assign them/close the issue as required. |
This is a recent addition: open-telemetry/opentelemetry-specification#3540
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#gauge
The text was updated successfully, but these errors were encountered: