-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Refactor env var parsing #3766
Comments
@dmathieu PTAL |
I saw #3548 and now I have concerns. This kind of refactoring may introduce the same problem in future if we do breaking changes in Maybe we should use code generation to copy the same source code into multiple packages instead of using an In OTel .NET SDK, to mitigate this kind of internal API incompatibility problems we include source code files into multiple C# projects (it works like a soft link). EDIT: AFAIK there is a non-written policy that the user should use the "same" (meaning the once that were released together) version of OTel packages. |
The current proposal is to try using code generation to make sure that modules are not coupled because of "internal dependencies". From #3805 (comment):
|
Blocked by #3846 |
Closing as I think the value is not worth the cost. |
We have similar (sometimes the same) env var parsing in a few places:
I am not convinced that if we want have one package with all possible env vars like https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/internal/env/env.go. I feel such package would not be "cohesive". I would prefer to have a package with code that helps parsing env vars. We should define the env var keys and use these helper functions in packages that need these env vars.
I propose to create the env var parsing code in
go.opentelemetry.io/otel/internal/env
. The reason is thatgo.opentelemetry.io/otel/exporters/*
does not have access to the currentgo.opentelemetry.io/otel/sdk/internal/env
.The package could have following functions (I do not think we need more):
PS. If anything is not clear than maybe creating a PR will be easier for me 😅
The text was updated successfully, but these errors were encountered: