Telemetry.otlpLayer
A plain Effect OTLP layer that sends the spans, logs and metrics of the
Effect it is provided to into a source: the stack’s OWN telemetry (provide
it to the stack program and the deploy’s spans — every provider call — and
logs go to Better Stack), or any script’s. Batches are bounded (Effect’s
OTLP exporters drop beyond their queue) and flushed when the layer’s scope
closes. The token only ever travels in the Authorization header.
program.pipe(Effect.provide(BetterStack.Telemetry.otlpLayer({ token: Redacted.make(process.env.DEPLOY_TRACES_TOKEN!), ingestingHost: "s123.eu-nbg-2.betterstackdata.com", serviceName: "deploys",})));