fix(tracing): set OTel service.name resource (default codex)#23
Draft
tyler-b4innova wants to merge 1 commit into
Draft
fix(tracing): set OTel service.name resource (default codex)#23tyler-b4innova wants to merge 1 commit into
tyler-b4innova wants to merge 1 commit into
Conversation
NodeTracerProvider was constructed without a resource, so traces landed as unknown_service:node. Honor OTEL_SERVICE_NAME / OTEL_RESOURCE_ATTRIBUTES and default service.name=codex; map config.environment to deployment.environment.name.
|
|
Member
|
@claude review |
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.
Problem
setupInstrumentation()constructsNodeTracerProviderwith onlyspanProcessorsand noresource. The provider falls back todefaultResource()→service.name=unknown_service:node(Node argv0).This makes multi-service Langfuse projects (shared ingest) unable to filter interactive Codex traces by
service.name. The sibling Claude Code Python plugin already picks upOTEL_SERVICE_NAME/OTEL_RESOURCE_ATTRIBUTESvia the SDK's always-on OTEL env detector.Fix
resourceFromAttributesservice.nametocodex(override viaOTEL_SERVICE_NAME)OTEL_RESOURCE_ATTRIBUTES(comma-separatedk=v)config.environment→deployment.environment.name@opentelemetry/resourcesTest plan
pnpm test(existing suite)pnpm run buildOTEL_SERVICE_NAME=codexand confirm resource attrs in Langfuse