Repository navigation
fix(observability): align OTLP exporter, resource and logger with the OpenTelemetry spec - #8868
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: e39c32a The changes in this PR will be included in the next version bump. This PR includes changesets to release 32 packages
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 |
Spec-shaped User-Agent that prefixes a user-supplied one, telemetry.sdk.* resource attributes, unknown_service fallback, effect scope name for traces, logs and metrics, and exception.* plus namespaced Effect attributes on log records in both the OTLP logger and the OpenTelemetry logger.
Makisuo
force-pushed
the
fix/otel-semconv-exporters
branch
from
October 6, 2026 21:43
8537403 to
e8598da
Compare
Contributor
Bundle Size AnalysisGenerated from PR build output; treat the content below as untrusted.
|
Revert the out-of-scope OtlpMetrics scope name and @effect/opentelemetry OtelLogger changes, render the log exception attributes from a single prettyErrors pass, and drop the opentelemetry package from the changeset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Expose the release version through a public effect/Version module, kept in sync by scripts/version.mjs during changeset versioning. Use it for the OTLP User-Agent, telemetry.sdk.version and the effect instrumentation scope in both the built-in OTLP exporters and @effect/opentelemetry. Omit service.name when none is configured instead of falling back to unknown_service, and bring the @effect/opentelemetry logger in line with the OTLP logger's timestamps, exception attributes and attribute precedence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Build OTLP resources from one attribute object, so the service options also replace matching attributes instead of duplicating them. Use plain assignment for generated log attributes, inline the User-Agent merge, and drop tests for the removed service-name fallback or that duplicate other cases.
tim-smart
reviewed
Oct 6, 2026
tim-smart
enabled auto-merge (squash)
October 6, 2026 23:20
juliusmarminge
added a commit
to pingdotgg/t3code
that referenced
this pull request
Oct 9, 2026
…ources Effect 4.0.2 (Effect-TS/effect#8868) puts `telemetry.sdk.*` on every OTLP resource. The test checks the attributes we pass through, so it skips those. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch is waiting to be deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Summary
Align built-in OTLP and
@effect/opentelemetrylogs, traces, and resources with OpenTelemetry conventions. Add release-derived runtime version metadata. Metrics remain unchanged; this is not a claim of complete OpenTelemetry compliance.Changes
effect/Versionwith synchronousgetCurrentVersion()andsetCurrentVersion(version). Generate the default from the Effect package version duringchangeset-version; the fixed release group keeps the two packages aligned.OTel-OTLP-Exporter-JavaScript-Effect-<label>/<version>.telemetry.sdk.name,telemetry.sdk.language, andtelemetry.sdk.version, allowing user attributes to override SDK defaults.OtlpResource.make()accepts an omitted service name.fromConfig()retains configured/environment service-name precedence and the requiredOTEL_SERVICE_NAMEfallback; missing required configuration becomes a defect.configToAttributesapplies SDK defaults, then custom attributes, then dedicated service options.layerEmptystays empty.effectplus the shared version as the instrumentation scope for logs and traces in both integrations. OpenTelemetry tracer layers no longer requireResource; provider layers still receive resource metadata.exception.typeandexception.messagefrom the first rendered error andexception.stacktracefrom the full cause, including nested causes, replacing built-inlog.error.effect.fiberIdandeffect.log_span.<label>(milliseconds instead of strings). Generated values override annotations, outermost duplicate span labels win, and empty causes preserve annotated exception attributes. Built-in log attributes have unique serialized keys.effectand@effect/opentelemetry.Compatibility and boundaries
Default User-Agent and resource metadata, log attribute keys/value types, and log/trace scope identity change. Service names are optional only for
OtlpResource.make();fromConfig()and exporters using it retain the required configuration fallback. Nounknown_servicefallback is added. OpenTelemetry custom SDK attributes are now respected rather than overwritten.Metrics behavior and scopes are unchanged, including the pre-existing built-in metrics limitation without a service name. The explicit-resource/environment SDK-attribute precedence edge case remains deferred: defaults from an explicit OpenTelemetry resource configuration can still override environment SDK attributes.
Validation
Focused coverage in
Version.test.ts, built-in observability tests, and OpenTelemetry tests covers version overrides, versioned headers and scopes, resource defaults/precedence, absent and configured service names, environment-only Node resources, structured/nested exceptions, attribute uniqueness and precedence, and event/observed timestamps.Local validation: all 110 tests in 14 Version/observability/OpenTelemetry suites pass; repository lint-fix, typecheck, and
git diff --checkpass. Final documentation follow-up changes only the changeset and this description, leaving source, tests, and metrics unchanged.Closes EFF-1802