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

docs(meter): Update meter.Meter contract #4853

Closed
wants to merge 1 commit into from

Conversation

cep21
Copy link

@cep21 cep21 commented Jan 24, 2024

Resolves #4836

@cep21
Copy link
Author

cep21 commented Jan 24, 2024

Documenting that callers can rely on the current behavior of meter.Meter, which is different than the rest of the Go standard library. For example, http.NewRequest returns a nil first object if the second return value, error, is non nil.

Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is too restrictive. There is nothing in the OTel metric specification that states an implementation cannot return nil and an error from one of these methods. Restricting all implementations of this interface to always return a non-nil value is overreaching.

@MrAlias
Copy link
Contributor

MrAlias commented Feb 5, 2024

Closing based on the resolution to #4836 being open-telemetry/opentelemetry-go-contrib#4875.

@MrAlias MrAlias closed this Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question about correctness of metric.Meter implementation and use
2 participants