From 9fc9757df59c10acd92f0910484f4309d722fc18 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Tue, 7 Dec 2021 14:59:42 -0800 Subject: [PATCH] adding environment variable for OTEL_LOGS_EXPORTER (#2196) * adding environment variable for OTEL_LOGS_EXPORTER This PR adds the environment variable to support configuration of log exporters as is supported for metrics and traces today. * update changelog --- CHANGELOG.md | 3 +++ spec-compliance-matrix.md | 1 + specification/sdk-environment-variables.md | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b3cd8d7ff7..748e270406d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,9 @@ release. ### Logs +- Add OTEL_LOGS_EXPORTER environment variable. + ([#2196](https://github.com/open-telemetry/opentelemetry-specification/pull/2196)) + ### Resource ### Semantic Conventions diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 95e1ab18ca9..14184cff1d1 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -247,6 +247,7 @@ Note: Support for environment variables is optional. |OTEL_EXPORTER_ZIPKIN_* | - | | | | | - | - | - | - | + | - | |OTEL_TRACES_EXPORTER | - | + | | + | + | + | | - | - | | | |OTEL_METRICS_EXPORTER | - | + | | + | - | - | | - | - | - | - | +|OTEL_LOGS_EXPORTER | | | | | | | | | | | | |OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT | - | + | | + | + | - | | + | - | | | |OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT | | | | | | | | | | | | |OTEL_SPAN_EVENT_COUNT_LIMIT | - | + | | + | + | - | | + | - | | | diff --git a/specification/sdk-environment-variables.md b/specification/sdk-environment-variables.md index a58cc299def..171ca551bc4 100644 --- a/specification/sdk-environment-variables.md +++ b/specification/sdk-environment-variables.md @@ -171,6 +171,7 @@ We define environment variables for setting one or more exporters per signal. | ------------- | ---------------------------------------------------------------------------- | ------- | | OTEL_TRACES_EXPORTER | Trace exporter to be used | "otlp" | | OTEL_METRICS_EXPORTER | Metrics exporter to be used | "otlp" | +| OTEL_LOGS_EXPORTER | Logs exporter to be used | "otlp" | The SDK MAY accept a comma-separated list to enable setting multiple exporters. @@ -187,6 +188,11 @@ Known values for `OTEL_METRICS_EXPORTER` are: - `"prometheus"`: [Prometheus](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md) - `"none"`: No automatically configured exporter for metrics. +Known values for `OTEL_LOGS_EXPORTER` are: + +- `"otlp"`: [OTLP](./protocol/otlp.md) +- `"none"`: No automatically configured exporter for logs. + ## Metrics SDK Configuration **Status**: [Experimental](document-status.md)