Skip to content

Default OTEL_*_EXPORTER to otlp in OTLP layerFromConfig - #10232

Closed
schutzelaars wants to merge 2 commits into
Effect-TS:v4/next-minorfrom
schutzelaars:otlp-exporter-default
Closed

schutzelaars wants to merge 2 commits into
Effect-TS:v4/next-minorfrom
schutzelaars:otlp-exporter-default

Conversation

@schutzelaars

@schutzelaars schutzelaars commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Otlp.layerFromConfig and the OtlpTracer, OtlpLogger and OtlpMetrics layerFromConfig layers exported a signal only when OTEL_<SIGNAL>_EXPORTER contained otlp. An unset variable counted as an empty list, so setting only OTEL_EXPORTER_OTLP_ENDPOINT exported nothing, with no warning. The OpenTelemetry spec defaults these variables to otlp, and the JS and Go SDKs do the same.

The default is now otlp. A value without otlp, such as none, still turns the signal off, and nothing is exported without an endpoint, as before. The JSDoc of the four layers now states both rules.

Behaviour change: a process that sets an OTLP endpoint but leaves OTEL_*_EXPORTER unset now exports. Set OTEL_TRACES_EXPORTER, OTEL_METRICS_EXPORTER or OTEL_LOGS_EXPORTER to none to keep a signal off.

The new endpoint-only test in OtlpConfig.test.ts fails on main. The existing OtlpExporter test covers none. Observability tests, pnpm lint-fix, pnpm jsdocs --check and pnpm check pass.

Closes #10231
Closes EFF-3233

@changeset-bot

changeset-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b86793d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 33 packages
Name Type
effect Minor
@effect/opentelemetry Minor
@effect/vitest Minor
@effect/ai-anthropic Minor
@effect/ai-cloudflare Minor
@effect/ai-openai-compat Minor
@effect/ai-openai Minor
@effect/ai-openrouter Minor
@effect/ai-typesafe Minor
@effect/atom-react Minor
@effect/atom-solid Minor
@effect/atom-vue Minor
@effect/platform-browser Minor
@effect/platform-bun Minor
@effect/platform-deno Minor
@effect/platform-node-shared Minor
@effect/platform-node Minor
@effect/sql-clickhouse Minor
@effect/sql-d1 Minor
@effect/sql-libsql Minor
@effect/sql-mssql Minor
@effect/sql-mysql2 Minor
@effect/sql-pg Minor
@effect/sql-pglite Minor
@effect/sql-sqlite-bun Minor
@effect/sql-sqlite-do Minor
@effect/sql-sqlite-node Minor
@effect/sql-sqlite-react-native Minor
@effect/sql-sqlite-wasm Minor
@effect/docgen Minor
@effect/doctest Minor
@effect/graphql-generator Minor
@effect/openapi-generator Minor

Not sure what this means? Click here to learn what changesets are.

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

@effect-bot
effect-bot changed the base branch from main to v4/next-minor October 31, 2026 10:35
@effect-janitor effect-janitor Bot added 4.0 and removed 4.0 labels Oct 31, 2026
@github-actions

github-actions Bot commented Oct 31, 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%)

@effect-bot
effect-bot force-pushed the otlp-exporter-default branch from 7a72378 to b072fc3 Compare October 31, 2026 11:14
@effect-bot

Copy link
Copy Markdown
Contributor

Thanks for the clear report and for putting this PR together.

We've decided not to change the default. In Effect, each signal stays off until it is explicitly enabled, so exporting it needs both an endpoint and OTEL_<SIGNAL>_EXPORTER=otlp. A shared endpoint alone should not start exporting signals that were never turned on. This is deliberately stricter than the OpenTelemetry SDK spec, in the same way that we require an endpoint instead of falling back to localhost:4318.

#10269 resolves #10231 instead. It documents the rule and the difference from the spec on all four layerFromConfig layers, and adds a test that an endpoint alone exports nothing. I'm closing this PR in favour of that one.

@effect-bot effect-bot closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Otlp.layerFromConfig exports nothing when only OTEL_EXPORTER_OTLP_ENDPOINT is set

2 participants