Fix get exporter names condition#1707
Conversation
|
This issue will only happen if |
| if ( | ||
| trace_exporters is not None | ||
| or trace_exporters.lower().strip() != "none" | ||
| and trace_exporters != "" |
There was a problem hiding this comment.
Can we just do if trace_exporters and trace_exporters.lower().strip() != "none"?
Here, the blank means the following 2 things.
|
CHANGELOG.md
Outdated
| ([#1695](https://github.com/open-telemetry/opentelemetry-python/pull/1695)) | ||
| - Change Jaeger exporters to obtain service.name from span | ||
| ([#1703](https://github.com/open-telemetry/opentelemetry-python/pull/1703)) | ||
| - Fixed a parse error on no `OTEL_TRACES_EXPORTER` |
There was a problem hiding this comment.
can you change the description to be focused on the behavior of the user?
In this case, I would expect something like Fixed an unset OTEL_TRACES_EXPORTER resulting in an error.
This way a reader can identify whether their behavior is fixed or not.
toumorokoshi
left a comment
There was a problem hiding this comment.
minor nit on changelog description, all else looks good!
|
I updated the code, thanks! |
|
@dtaniwaki |
I think it was a logical oversight. Probably should have been the "and" operator rather than or. If it's none, the first check is false so the OR statement continues, executing the second statement. Here's what the logic does in a similar example: |
Description
With the current condition,
_get_exporter_namesalways fails with noOTEL_TRACES_EXPORTER.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Configurator().configure()w/ and w/oOTEL_TRACES_EXPORTER.Does This PR Require a Contrib Repo Change?
Checklist: