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

Inconsistency in API specification for duplicate instrument names and spec-compliance-matrix #2664

Closed
srikanthccv opened this issue Jul 14, 2022 · 2 comments · Fixed by #2668
Assignees
Labels
spec:metrics Related to the specification/metrics directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal

Comments

@srikanthccv
Copy link
Member

API Spec says

When more than one Instrument of the same name is created for identical Meters, denoted duplicate instrument registration, the implementation MUST create a valid Instrument in every case. Here, "valid" means an instrument that is functional and can be expected to export data, despite potentially creating a semantic error in the data model.

When more than one distinct Instrument is registered with the same name for identical Meters, the implementation SHOULD emit a warning to the user informing them of duplicate registration conflict(s). The warning helps to avoid the semantic error state described in the OpenTelemetry Metrics data model when more than one Metric is written for a given instrument name and Meter identity by the same MeterProvider.

The spec-compliance-matrix has a row that requires returning error in the event of duplicate instrument name https://github.com/open-telemetry/opentelemetry-specification/blob/main/spec-compliance-matrix.md#metrics.

An error is returned when multiple instruments are registered under the same Meter using the same name.

I believe the compliance matrix is outdated and should reflect the API specification, If this is a correct assumption I can send a PR updating the matix.

@srikanthccv srikanthccv added the spec:metrics Related to the specification/metrics directory label Jul 14, 2022
@pichlermarc
Copy link
Member

I think your assumption is correct. The wording seems to reflect the spec before #2317 landed.

@jsuereth
Copy link
Contributor

Yep, this correct and please open a PR to update the matrix

@jsuereth jsuereth added triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal labels Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:metrics Related to the specification/metrics directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal
Projects
None yet
4 participants