Skip to content
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

Verify compliant metric API specification implementation: Instrument Asynchronous Gauge #3377

Closed
2 tasks done
Tracked by #3383
MrAlias opened this issue Oct 20, 2022 · 8 comments
Closed
2 tasks done
Tracked by #3383
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics pkg:API Related to an API package

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Oct 20, 2022

  • Identify all the normative requirements, recommendations, and options the specification defines as comments to this issue
  • Ensure the current metric API implementation is compliant with these normative requirements, recommendations, and options in those comments.
@MrAlias MrAlias added area:metrics Part of OpenTelemetry Metrics pkg:API Related to an API package labels Oct 20, 2022
@MrAlias
Copy link
Contributor Author

MrAlias commented Nov 8, 2022

#3453

@MrAlias
Copy link
Contributor Author

MrAlias commented Nov 8, 2022

#3454

@MrAlias MrAlias self-assigned this Jan 5, 2023
@MrAlias
Copy link
Contributor Author

MrAlias commented Jan 6, 2023

There MUST NOT be any API for creating an Asynchronous Gauge other than with a Meter.

With #3454 now complete, our implementation is compliant.

@MrAlias
Copy link
Contributor Author

MrAlias commented Jan 6, 2023

This MAY be called CreateObservableGauge. If strong type is desired, OpenTelemetry API] authors MAY decide the language idiomatic name(s), for example CreateUInt64ObservableGauge, CreateDoubleObservableGauge, CreateObservableGauge<UInt64>, CreateObservableGauge<double>.

We do not follow this optional criteria. We instead follow more common Go method naming and use Int64ObservableGauge and Float64ObservableGauge method names.

@MrAlias
Copy link
Contributor Author

MrAlias commented Jan 6, 2023

It is highly recommended that implementations use the name ObservableGauge (or any language idiomatic variation, e.g. observable_gauge) unless there is a strong reason not to do so.

I'm going to assume the authors intended "recommended" to be the normative key word "RECOMMENDED".

We do not follow this recommendation. #3453 is tracking this issue, and #3575 should address this.

@MrAlias
Copy link
Contributor Author

MrAlias commented Jan 6, 2023

For callback functions registered after an asynchronous instrument is created, the API is required to support a mechanism for unregistration.

I'm going to assume the authors intended "recommended" to be the normative key word "RECOMMENDED".

We are compliant with this, as explained here: #3373 (comment)

@MrAlias
Copy link
Contributor Author

MrAlias commented Jan 6, 2023

@MrAlias
Copy link
Contributor Author

MrAlias commented Jan 12, 2023

Every normative clause from the Asynchronous Gauge section of the v1.16.0 specification has been identified and our API has been validated that it complies. Closing.

@MrAlias MrAlias closed this as completed Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:metrics Part of OpenTelemetry Metrics pkg:API Related to an API package
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant