Nullstone capability that configures an application's OpenTelemetry SDK to export logs, traces, and metrics directly to Better Stack — no OTEL collector required.
Attach it to an app and it injects the standard OTEL env vars. The OTLP endpoint and Authorization
header come from a connected betterstack datastore (aws-betterstack / gcp-betterstack);
the tuning knobs come from capability variables.
For the collector-based alternative (cluster-wide delivery, shared pipelines), see
k8s-otel-betterstack-extender — don't attach both to the same app, since both set
OTEL_EXPORTER_OTLP_ENDPOINT-adjacent configuration.
| Name | Contract | Required | Purpose |
|---|---|---|---|
betterstack |
datastore/*/betterstack |
yes | The Better Stack credentials (ingesting host + source token). |
The contract is provider-wildcarded: connect aws-betterstack (token in AWS Secrets Manager) or
gcp-betterstack (token in GCP Secret Manager). The module detects the cloud from the secret
identifier and reads the token accordingly at apply time.
Plain env vars (via the env output):
| Name | Source |
|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT |
https://<ingesting_host> from the datastore |
OTEL_EXPORTER_OTLP_PROTOCOL |
fixed: http/protobuf (Better Stack ingests OTLP over HTTP) |
OTEL_EXPORTER_OTLP_COMPRESSION |
compression variable |
OTEL_LOGS_EXPORTER |
logs_exporter variable |
OTEL_METRICS_EXEMPLAR_FILTER |
metrics_exemplar_filter variable |
OTEL_METRICS_EXPORTER |
metrics_exporter variable |
OTEL_METRIC_EXPORT_INTERVAL |
metric_export_interval variable |
OTEL_TRACES_EXPORTER |
traces_exporter variable |
OTEL_TRACES_SAMPLER |
traces_sampler variable |
Secret env vars (via the secrets output):
| Name | Source |
|---|---|
OTEL_EXPORTER_OTLP_HEADERS |
Authorization=Bearer <source_token> read from the datastore's secret |
OTEL SDKs append the per-signal path (/v1/logs, /v1/traces, /v1/metrics) to
OTEL_EXPORTER_OTLP_ENDPOINT when using OTLP over HTTP, matching Better Stack's documented
endpoints.
| Name | Default | Description |
|---|---|---|
logs_exporter |
otlp,console |
Comma-separated log exporters, or none. Default keeps logs on stdout too. |
compression |
gzip |
OTLP payload compression: gzip or none. |
metrics_exemplar_filter |
always_off |
always_off, always_on, or trace_based. Better Stack does not use exemplars. |
metrics_exporter |
otlp |
Comma-separated metric exporters, or none to disable metrics. |
metric_export_interval |
60000 |
Milliseconds between metric exports. |
traces_exporter |
otlp |
Comma-separated trace exporters, or none to disable traces. |
traces_sampler |
parentbased_always_on |
OTEL sampler; pair ratio samplers with OTEL_TRACES_SAMPLER_ARG on the app. |
Logs caveat: these env vars configure the SDK's log pipeline, but whether app log lines flow through it depends on the language. Java's agent and Python's auto-instrumentation (
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true) honorOTEL_LOGS_EXPORTERdirectly; Node and Go typically need an explicit log-bridge appender in code.
| Name | Description |
|---|---|
env |
list(object({ name, value })) — plain env vars injected into the app. |
secrets |
list(object({ name, value })) — secret env vars (the OTLP Authorization header). Sensitive. |