Configuration
Genesis supports configuring OpenTelemetry via standard environment variables. When you run the CLI (genesis consumer or genesis outbound), these variables control the metrics resource and whether the SDK is enabled.
Supported variables
OTEL_SDK_DISABLED- Disables the OpenTelemetry SDK when set to
true(case-insensitive). - When disabled, the CLI does not set a meter provider; metrics are no-ops.
- Default: not set (SDK enabled).
- Disables the OpenTelemetry SDK when set to
OTEL_SERVICE_NAME- Sets the
service.nameresource attribute for metrics (and traces if you configure a tracer provider). - Default:
genesis.
- Sets the
OTEL_RESOURCE_ATTRIBUTES- Extra resource attributes as comma-separated key-value pairs:
key1=value1,key2=value2. - If
service.nameis present here, it is overridden byOTEL_SERVICE_NAMEwhen that variable is set. - Example:
deployment.environment=production,service.version=1.0.0.
- Extra resource attributes as comma-separated key-value pairs:
OTEL_EXPORTER_OTLP_ENDPOINT- Base URL for OTLP/HTTP export (traces and metrics). When set, the CLI configures an OTLP HTTP exporter so telemetry is sent to this endpoint (e.g. an OpenTelemetry Collector).
- Default for HTTP per spec:
http://localhost:4318(collector OTLP HTTP receiver).
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT- Overrides the metrics endpoint (if unset,
OTEL_EXPORTER_OTLP_ENDPOINTis used).
- Overrides the metrics endpoint (if unset,
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT- Overrides the traces endpoint (if unset,
OTEL_EXPORTER_OTLP_ENDPOINTis used). When set (or whenOTEL_EXPORTER_OTLP_ENDPOINTis set), the CLI also sets a TracerProvider with OTLP HTTP span exporter.
- Overrides the traces endpoint (if unset,
Examples
Disable OpenTelemetry (e.g. in tests or when using another instrumentation):
export OTEL_SDK_DISABLED=true
genesis consumer ...Set a custom service name and environment:
export OTEL_SERVICE_NAME=my-call-center
export OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production
genesis outbound ...Send metrics and traces to an OTLP collector over HTTP:
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
genesis consumer ...