Skip to main content
Both SDKs resolve configuration the same way, from the same environment variable names, with the same defaults.

Precedence

Explicit arguments to init() win, then ATLAN_* environment variables, then the standard OTLP environment variables, then the built-in defaults.

Environment variables

Boolean variables accept true, 1, or yes, case-insensitively. Anything else reads as false. A non-numeric value in a numeric variable is ignored with a warning and the default applies. When no ATLAN_API_KEY is set, the SDK falls back to OTEL_EXPORTER_OTLP_TRACES_ENDPOINT or OTEL_EXPORTER_OTLP_ENDPOINT and behaves as a generic OTLP client.
Cloudflare Workers have no ambient environment, so none of these variables are readable there. Pass every value through init() options instead — see Serverless.

Export modes

init() resolves exactly one mode and logs which:

When tracing disables itself

Misconfiguration degrades to disabled with a warning rather than breaking your application. The SDK disables itself when:
  • no API key and no OTLP endpoint are configured
  • service_name is missing
  • base_url is not https — plain http is allowed only for localhost, 127.0.0.1, and ::1
Because these are warnings, a misconfigured process starts and serves traffic normally while reporting nothing. If traces are missing, check the startup logs first.

The one hard failure

Exporting to an Atlan endpoint with no workspace raises AtlanConfigError at init():
This is deliberate. Traces without a workspace land in default and are effectively lost, so failing at startup is better than silently discarding production telemetry.

init() options

Every environment variable above has an equivalent option. These have no environment equivalent: init() is idempotent per API key. Calling it again with the same key returns the existing client rather than building a second pipeline — safe in a module that may be imported more than once.

Lifecycle

flush() exports everything buffered and resolves when the request completes. shutdown() flushes and then tears the pipeline down; use it on final exit. Long-lived services rely on the background batch and need neither.

Next steps

Serverless

Immediate export, waitUntil, and Workers bundling.

Privacy controls

Content suppression, masking, and sampling.