Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Otlp exporter configuration environment variables specs-compliant #974

Merged
merged 10 commits into from
Sep 14, 2021
24 changes: 20 additions & 4 deletions exporters/otlp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,27 @@ options.url = "localhost:12345";
auto exporter = std::unique_ptr<sdktrace::SpanExporter>(new otlp::OtlpHttpExporter(options));
```

### Configuration options
### Configuration options ( OTLP GRPC Exporter )

| Option | Default |
| ------------ |----------------- |
| `endpoint` | `localhost:4317` |
| Option | Env Variable |Default | Description |
| ------------ |---------------|------------ |----------------|
| `endpoint` | `OTEL_EXPORTER_OTLP_GRPC_ENDPOINT` |`localhost:4317` | The OTLP GRPC endpoint to connect to |
| `use_ssl_credentials` | `OTEL_EXPORTER_OTLP_GRPC_SSL_ENABLE` | `false` | Whether the endpoint is SSL enabled |
| `ssl_credentials_cacert_path` | n/a | `""` | SSL Certificate file path |
| `ssl_credentials_cacert_as_string` | `OTEL_EXPORTER_OTLP_GRPC_SSL_CERTIFICATE` | `""` | SSL Certifcate as in-memory string |

Note: These env variables names are not same as in [specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.0.0/specification/protocol/exporter.md).
lalitb marked this conversation as resolved.
Show resolved Hide resolved
And there is no plan to remove them when the support for environment variables as required by specification is added.

### Configuration options ( OTLP HTTP Exporter )

| Option | Env Variable |Default | Description |
| ------------ |-----|------------ |------|
| `url` | n/a | `http://localhost:4317/v1/traces` | The OTLP HTTP endpoint to connect to |
| `content_type` | n/a | `application/json` | Data format used - JSON or Binary |
| `json_bytes_mapping` | n/a | `JsonBytesMappingKind::kHexId` | Encoding used for trace_id and span_id |
| `use_json_name` | n/a | `false` | Whether to use json name of protobuf field to set the key of json |
| `timeout` | n/a | `3000 ms` | http timeout |
lalitb marked this conversation as resolved.
Show resolved Hide resolved

## Example

Expand Down