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

otlpmetricgrpc.New and otlpmetrichttp.New should return structs #4247

Closed
pellared opened this issue Jun 22, 2023 · 0 comments · Fixed by #4272
Closed

otlpmetricgrpc.New and otlpmetrichttp.New should return structs #4247

pellared opened this issue Jun 22, 2023 · 0 comments · Fixed by #4272
Assignees
Labels
area:metrics Part of OpenTelemetry Metrics pkg:exporter:otlp Related to the OTLP exporter package

Comments

@pellared
Copy link
Member

pellared commented Jun 22, 2023

All the metrics components SHOULD allow new methods to be added to existing components without introducing breaking changes.

otlpmetricgrpc.New and otlpmetrichttp.New are components returned as interfaces. It would not possible to add a new methods that would control the exporter without creating a new method like NewBis that would return a struct (or other interface). I think it would be more flexible if both methods return structs instead of Exporter interface. The same is already done for span exporters (see here).

Originally posted by @pellared in #3671 (comment)

@pellared pellared changed the title otlpmetricgrpc.New and `otlpmetrichttp.New should returns structs otlpmetricgrpc.New and otlpmetrichttp.New should returns structs Jun 22, 2023
@pellared pellared added area:metrics Part of OpenTelemetry Metrics pkg:SDK Related to an SDK package pkg:exporter:otlp Related to the OTLP exporter package labels Jun 22, 2023
@pellared pellared removed the pkg:SDK Related to an SDK package label Jun 22, 2023
@pellared pellared self-assigned this Jun 22, 2023
@pellared pellared changed the title otlpmetricgrpc.New and otlpmetrichttp.New should returns structs otlpmetricgrpc.New and otlpmetrichttp.New should return structs Jun 23, 2023
@MrAlias MrAlias added this to the v1.17.0/v0.40.0 milestone Aug 3, 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:exporter:otlp Related to the OTLP exporter package
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants