File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed
opentelemetry-api/src/opentelemetry
opentelemetry-sdk/src/opentelemetry/sdk/_configuration Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
([ #2253 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/2253 ) )
15
15
- Rename ConsoleExporter to ConsoleLogExporter
16
16
([ #2307 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/2307 ) )
17
+ - Adding OTEL_LOGS_EXPORTER environment variable
18
+ ([ #2320 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/2320 ) )
17
19
18
20
## [ 1.7.1-0.26b1] ( https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.7.0-0.26b0 ) - 2021-11-11
19
21
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ OTEL_LOGS_EXPORTER = "OTEL_LOGS_EXPORTER"
16
+ """
17
+ .. envvar:: OTEL_LOGS_EXPORTER
18
+
19
+ """
20
+
15
21
OTEL_METRICS_EXPORTER = "OTEL_METRICS_EXPORTER"
16
22
"""
17
23
.. envvar:: OTEL_METRICS_EXPORTER
Original file line number Diff line number Diff line change 25
25
26
26
from opentelemetry import trace
27
27
from opentelemetry .environment_variables import (
28
+ OTEL_LOGS_EXPORTER ,
28
29
OTEL_PYTHON_ID_GENERATOR ,
29
30
OTEL_TRACES_EXPORTER ,
30
31
)
45
46
_RANDOM_ID_GENERATOR = "random"
46
47
_DEFAULT_ID_GENERATOR = _RANDOM_ID_GENERATOR
47
48
48
- # TODO: add log exporter env variable
49
- _OTEL_LOGS_EXPORTER = "OTEL_LOGS_EXPORTER"
50
-
51
49
52
50
def _get_id_generator () -> str :
53
51
return environ .get (OTEL_PYTHON_ID_GENERATOR , _DEFAULT_ID_GENERATOR )
@@ -175,7 +173,7 @@ def _import_id_generator(id_generator_name: str) -> IdGenerator:
175
173
def _initialize_components (auto_instrumentation_version ):
176
174
trace_exporters , log_exporters = _import_exporters (
177
175
_get_exporter_names (environ .get (OTEL_TRACES_EXPORTER )),
178
- _get_exporter_names (environ .get (_OTEL_LOGS_EXPORTER )),
176
+ _get_exporter_names (environ .get (OTEL_LOGS_EXPORTER )),
179
177
)
180
178
id_generator_name = _get_id_generator ()
181
179
id_generator = _import_id_generator (id_generator_name )
You can’t perform that action at this time.
0 commit comments