feat: use DD_SERVICE for inferred spans when integration service names are removed - #814
Draft
zarirhamza wants to merge 1 commit into
Draft
feat: use DD_SERVICE for inferred spans when integration service names are removed#814zarirhamza wants to merge 1 commit into
zarirhamza wants to merge 1 commit into
Conversation
…s are removed When DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED=true and DD_SERVICE is set, inferred (synthetic) event-source spans use the base service name instead of the AWS resource/instance representation. This gives users a single setting to consolidate every trigger span onto the function's service, rather than one DD_SERVICE_MAPPING entry per trigger type per function. An explicit DD_SERVICE_MAPPING entry still takes precedence, and default behavior is unchanged, so existing integration snapshots are unaffected. Mirrors the resolution order in datadog-lambda-python.
|
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.
Summary
DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED=trueandDD_SERVICEis set, inferred (synthetic) event-source spans use the base service name (DD_SERVICE) instead of the AWS resource/instance representation.DD_SERVICE_MAPPINGentry still takes precedence overDD_SERVICE.Resolution order in
determineServiceNameDD_SERVICE_MAPPING(specific key, then generic key)DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLEDandDD_SERVICEset →DD_SERVICEDD_TRACE_AWS_SERVICE_REPRESENTATION_ENABLEDis off → fallbackMotivation
Customers currently need one
DD_SERVICE_MAPPINGentry per trigger type per function to get their event-source spans onto their own service name. This gives them a single setting that consolidates all of them at once.Tracked by FRSLES-869. Mirrors the resolution order in the Python layer (datadog-lambda-python#834) and in the extension.
Scope
Service-name resolution only.
peer.serviceon inferred spans continues to reportDD_SERVICEas it does today; revisiting that pairing is deliberately left to a follow-up.Test plan
span-inferrer.spec.tscovering all 8 trigger types,DD_SERVICE_MAPPINGprecedence, unsetDD_SERVICE, and precedence overDD_TRACE_AWS_SERVICE_REPRESENTATION_ENABLED=falsenpx jest src/trace/span-inferrer.spec.ts— 105 passedindex.spec.tsfailures also present onmain)