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
1414 ([ #2253 ] ( https://github.com/open-telemetry/opentelemetry-python/pull/2253 ) )
1515- Rename ConsoleExporter to ConsoleLogExporter
1616 ([ #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 ) )
1719
1820## [ 1.7.1-0.26b1] ( https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.7.0-0.26b0 ) - 2021-11-11
1921
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ OTEL_LOGS_EXPORTER = "OTEL_LOGS_EXPORTER"
16+ """
17+ .. envvar:: OTEL_LOGS_EXPORTER
18+
19+ """
20+
1521OTEL_METRICS_EXPORTER = "OTEL_METRICS_EXPORTER"
1622"""
1723.. envvar:: OTEL_METRICS_EXPORTER
Original file line number Diff line number Diff line change 2525
2626from opentelemetry import trace
2727from opentelemetry .environment_variables import (
28+ OTEL_LOGS_EXPORTER ,
2829 OTEL_PYTHON_ID_GENERATOR ,
2930 OTEL_TRACES_EXPORTER ,
3031)
4546_RANDOM_ID_GENERATOR = "random"
4647_DEFAULT_ID_GENERATOR = _RANDOM_ID_GENERATOR
4748
48- # TODO: add log exporter env variable
49- _OTEL_LOGS_EXPORTER = "OTEL_LOGS_EXPORTER"
50-
5149
5250def _get_id_generator () -> str :
5351 return environ .get (OTEL_PYTHON_ID_GENERATOR , _DEFAULT_ID_GENERATOR )
@@ -175,7 +173,7 @@ def _import_id_generator(id_generator_name: str) -> IdGenerator:
175173def _initialize_components (auto_instrumentation_version ):
176174 trace_exporters , log_exporters = _import_exporters (
177175 _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 )),
179177 )
180178 id_generator_name = _get_id_generator ()
181179 id_generator = _import_id_generator (id_generator_name )
You can’t perform that action at this time.
0 commit comments