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

RFC | add more environment variables to OTEL exporter #106

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rfcs/0000-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ _This RFC does not specify the following planned changes:_
- The connector can read environment variables on startup for configuration purposes
- The following environment variables are reserved, and should not be used for connector-specific configuration:
- `HASURA_*`
- `OTEL_EXPORTER_*`
- `OTEL_*`
- Connectors can use environment variables as part of their configuration. Configuration that varies between different environments or regions (like connection strings) should be configurable via environment variables.
- The connector should send any relevant trace spans in the OTLP format to the OTEL collector hosted at the URL provided by the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable.
- Note: `OTEL_EXPORTER_OTLP_ENDPOINT` indicates the _root URL_ of the collector, and not the `/v1/traces` endpoint.
- Spans should indicate the service name provided by the `OTEL_SERVICE_NAME` environment variable.
- The connector can respect `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_RESOURCE_ATTRIBUTES` environment variables to add additional headers and resource attributes in outgoing gRPC or HTTP requests.
- Note: the value of `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_RESOURCE_ATTRIBUTES` is key-value pairs, for example, `api-key=key,other-config-value=value`.
- The connector must use the [tracecontext](https://www.w3.org/TR/trace-context) propagation.
- Other OTLP exporter configurations are optional depending on its language SDK. However, they must follow the [Environment Variable Specification](https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables) and [SDK config](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/).
- If the `HASURA_SERVICE_TOKEN_SECRET` environment variable is specified and non-empty, then the connector should implement bearer-token HTTP authorization using the provided static secret token.
- Information log messages should be logged in plain text to standard output.
- Error messages should be logged in plain text to standard error.
Expand All @@ -45,10 +49,6 @@ _This RFC does not specify the following planned changes:_
- To support these build steps, tooling should support building images from Dockerfiles. See "Deployment API" below.
- The motivation is that we may want to provision a connector process on short notice, e.g. to serve an incoming request.

### Open Questions

- Do we want to reserve environment variables `OTEL_*` for possible future use of the [OTLP exporter spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md)?

## Deployment API

Docker images should be built in the same environment as which they are run, to avoid possible issues with differences in architecture, etc. Therefore, we need to specify _how to build_ images which meet the specification above.
Expand Down
Loading