File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
68
68
([ #1695 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/1695 ) )
69
69
- Change Jaeger exporters to obtain service.name from span
70
70
([ #1703 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/1703 ) )
71
+ - Fixed an unset ` OTEL_TRACES_EXPORTER ` resulting in an error
72
+ ([ #1707 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/1707 ) )
71
73
72
74
### Removed
73
75
- Removed unused ` get_hexadecimal_trace_id ` and ` get_hexadecimal_span_id ` methods.
Original file line number Diff line number Diff line change @@ -50,10 +50,7 @@ def _get_exporter_names() -> Sequence[str]:
50
50
51
51
exporters = set ()
52
52
53
- if (
54
- trace_exporters is not None
55
- or trace_exporters .lower ().strip () != "none"
56
- ):
53
+ if trace_exporters and trace_exporters .lower ().strip () != "none" :
57
54
exporters .update (
58
55
{
59
56
trace_exporter .strip ()
Original file line number Diff line number Diff line change @@ -167,3 +167,15 @@ def test_otlp_exporter_overwrite(self):
167
167
@patch .dict (environ , {OTEL_TRACES_EXPORTER : "jaeger,zipkin" })
168
168
def test_multiple_exporters (self ):
169
169
self .assertEqual (sorted (_get_exporter_names ()), ["jaeger" , "zipkin" ])
170
+
171
+ @patch .dict (environ , {OTEL_TRACES_EXPORTER : "none" })
172
+ def test_none_exporters (self ):
173
+ self .assertEqual (sorted (_get_exporter_names ()), [])
174
+
175
+ @patch .dict (environ , {}, clear = True )
176
+ def test_no_exporters (self ):
177
+ self .assertEqual (sorted (_get_exporter_names ()), [])
178
+
179
+ @patch .dict (environ , {OTEL_TRACES_EXPORTER : "" })
180
+ def test_empty_exporters (self ):
181
+ self .assertEqual (sorted (_get_exporter_names ()), [])
You can’t perform that action at this time.
0 commit comments