Skip to content

Document per-signal opt-in for OTLP layerFromConfig - #10269

Merged
tim-smart merged 3 commits into
v4/next-minorfrom
otlp-layer-from-config-opt-in
Nov 1, 2026
Merged

tim-smart merged 3 commits into
v4/next-minorfrom
otlp-layer-from-config-opt-in

Conversation

@effect-bot

Copy link
Copy Markdown
Contributor

Otlp.layerFromConfig and the OtlpTracer, OtlpLogger and OtlpMetrics layerFromConfig layers export a signal only when an endpoint is set and OTEL_<SIGNAL>_EXPORTER includes otlp. This is deliberately stricter than the OpenTelemetry SDK spec, which defaults the exporter variables to otlp: a shared endpoint alone should not start exporting signals that were never enabled. Runtime behaviour is unchanged. The fix for #10231 is to document the rule.

  • The JSDoc of the four layers now states the rule and the difference from the spec. Otlp.layerFromConfig also shows the variables that enable all three signals.
  • A new test in OtlpConfig.test.ts checks that setting only the endpoint installs no exporters.
  • The existing OTEL_TRACES_EXPORTER=none flush test in OtlpExporter.test.ts now emits a span, so it covers traces as well as logs and metrics.

There is no changeset because this changes only docs and tests. This replaces #10232.

Closes #10231
Closes EFF-3233

Guard that an endpoint alone installs no exporters, and emit a span in the
OTEL_TRACES_EXPORTER=none flush test so it covers traces.
State that each signal needs an endpoint and OTEL_<SIGNAL>_EXPORTER=otlp,
that the exporter variables have no default unlike the OpenTelemetry SDK
spec, and show the variables needed to export all signals.
Bare assignments create shell variables that the application process does
not inherit, so copying the block left every signal disabled.
@changeset-bot

changeset-bot Bot commented Nov 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e46e8c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 39.35 KB 39.35 KB 0.00 KB (0.00%)
basic.ts 7.18 KB 7.18 KB 0.00 KB (0.00%)
batching.ts 11.06 KB 11.06 KB 0.00 KB (0.00%)
brand.ts 6.84 KB 6.84 KB 0.00 KB (0.00%)
cache.ts 11.49 KB 11.49 KB 0.00 KB (0.00%)
config.ts 22.77 KB 22.77 KB 0.00 KB (0.00%)
differ.ts 21.92 KB 21.92 KB 0.00 KB (0.00%)
http-client.ts 26.90 KB 26.90 KB 0.00 KB (0.00%)
http-router.ts 36.88 KB 36.88 KB 0.00 KB (0.00%)
logger.ts 11.96 KB 11.96 KB 0.00 KB (0.00%)
metric.ts 9.42 KB 9.42 KB 0.00 KB (0.00%)
optic.ts 7.05 KB 7.05 KB 0.00 KB (0.00%)
pubsub.ts 15.97 KB 15.97 KB 0.00 KB (0.00%)
queue.ts 12.77 KB 12.77 KB 0.00 KB (0.00%)
schedule.ts 11.74 KB 11.74 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 14.02 KB 14.02 KB 0.00 KB (0.00%)
schema-binary.ts 41.06 KB 41.06 KB 0.00 KB (0.00%)
schema-class.ts 21.65 KB 21.65 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 29.51 KB 29.51 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 27.91 KB 27.91 KB 0.00 KB (0.00%)
schema-string-transformation.ts 15.27 KB 15.27 KB 0.00 KB (0.00%)
schema-string.ts 12.26 KB 12.26 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.19 KB 16.19 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 38.87 KB 38.87 KB 0.00 KB (0.00%)
schema-toCodeDocument.ts 26.10 KB 26.10 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 20.83 KB 20.83 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 20.97 KB 20.97 KB 0.00 KB (0.00%)
schema-toFormatter.ts 21.07 KB 21.07 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 26.11 KB 26.11 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 21.16 KB 21.16 KB 0.00 KB (0.00%)
schema.ts 20.75 KB 20.75 KB 0.00 KB (0.00%)
stm.ts 14.15 KB 14.15 KB 0.00 KB (0.00%)
stream.ts 10.33 KB 10.33 KB 0.00 KB (0.00%)

@tim-smart
tim-smart merged commit 2e13c53 into v4/next-minor Nov 1, 2026
11 checks passed
@tim-smart
tim-smart deleted the otlp-layer-from-config-opt-in branch November 1, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants