-
Notifications
You must be signed in to change notification settings - Fork 773
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
FormatException is thrown when an invalid env var value is set #3690
Comments
The link is broken?
This looks like an implementation bug to me. Guess the fix should be swallow the exception and fallback to a default value. Doesn't sound like a breaking change. |
@reyang Thanks. I fixed the link. Feel free to hide/delete this comment |
I see in the example code you linked to @pellared, the
Based on @reyang's comment to swallow the exception and fallback to a default value would mean we can essentially remove the else block where the FormatException is thrown, correct? Thus, the code would attempt to parse the proper protocol, and if it can't, the fallback value will be that default value of OtlpExportProtocol.Grpc. I'm new to the project and if my understanding is incorrect, please let me know. If my understanding is correct, I can work on the fix. Thanks! |
@pellared I've been looking through the code and it looks like this issue has been handled in the following PRs:
I've done a more thorough search for any remaining clean-up that may be needed and I am not finding anything. It feels safe to close this issue. |
Thanks |
@moonbox3 Reopening; see:
Also the docs are not updated (find: There are even some tests which checks if |
Hi, I'm interested in working on this. |
According the OTel spec:
This is not what is done in multiple places like here.
Moreover, because of this, it won't be easy to set defaults for these values in .NET Automatic Instrumentation.
Can/do we want to address this? Won't it be seen as a breaking change?
Reference: open-telemetry/opentelemetry-specification#2766
CC @reyang @cijothomas @CodeBlanch
The text was updated successfully, but these errors were encountered: