From 7aae2a02315145aecd9238eb01868ad0e86aa471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Tue, 7 Sep 2021 17:05:42 +0200 Subject: [PATCH 1/2] otlptrace: Document supported environment variables (#2222) --- exporters/otlp/otlptrace/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/exporters/otlp/otlptrace/README.md b/exporters/otlp/otlptrace/README.md index dfdc575eab4..451ad6dc4df 100644 --- a/exporters/otlp/otlptrace/README.md +++ b/exporters/otlp/otlptrace/README.md @@ -28,3 +28,20 @@ The `otlptracegrpc` package implements a client for the span exporter that sends ## [`otlptracehttp`](https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp) The `otlptracehttp` package implements a client for the span exporter that sends trace telemetry data to the collector using HTTP with protobuf-encoded payloads. + +## Configuration + +### Environment Variables + +The following environment variables can be used +(instead of options objects) to override the default configuration. + +| Environment variable | Option | Default value | +| ------------------------------------------------------------------------ |------------------------------ | ----------------------------------- | +| `OTEL_EXPORTER_OTLP_ENDPOINT` `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` | `WithEndpoint` `WithInsecure` | `https://localhost:4317` | +| `OTEL_EXPORTER_OTLP_CERTIFICATE` `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` | `WithTLSClientConfig` | | +| `OTEL_EXPORTER_OTLP_HEADERS` `OTEL_EXPORTER_OTLP_TRACES_HEADERS` | `WithHeaders` | | +| `OTEL_EXPORTER_OTLP_COMPRESSION` `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` | `WithCompression` | | +| `OTEL_EXPORTER_OTLP_TIMEOUT` `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` | `WithTimeout` | `10s` | + +Configuration using options have precedence over the environment variables. From df2bdbbadb26cd3dc8387d2d3628667fd84e13dc Mon Sep 17 00:00:00 2001 From: Qian Deng Date: Tue, 7 Sep 2021 23:16:55 +0800 Subject: [PATCH 2/2] Fix the import comments of otelpconfig (#2224) keep import comments of otelpconfig consistent with other Signed-off-by: DQ Co-authored-by: Anthony Mirabella Co-authored-by: Tyler Yahn --- exporters/otlp/otlptrace/internal/otlpconfig/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exporters/otlp/otlptrace/internal/otlpconfig/options.go b/exporters/otlp/otlptrace/internal/otlpconfig/options.go index a97c880a422..0ec2c879eae 100644 --- a/exporters/otlp/otlptrace/internal/otlpconfig/options.go +++ b/exporters/otlp/otlptrace/internal/otlpconfig/options.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/internal/otlpconfig" +package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig" import ( "crypto/tls"