Skip to content

Ensure that _dd.srv_src is inherited#6642

Open
amarziali wants to merge 3 commits intomainfrom
andrea.marziali/ddsvcsrc-inherit
Open

Ensure that _dd.srv_src is inherited#6642
amarziali wants to merge 3 commits intomainfrom
andrea.marziali/ddsvcsrc-inherit

Conversation

@amarziali
Copy link
Copy Markdown
Contributor

@amarziali amarziali commented Mar 30, 2026

Motivation

Add a parametric test to ensure that, when a child span is opened without setting any service name, it inherits the service source from the parent

I also simplified the manifest and marked as a bug (with the related jira) for dotnet

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@amarziali amarziali requested review from a team as code owners March 30, 2026 08:57
@amarziali amarziali requested review from mtoffl01 and removed request for a team March 30, 2026 08:57
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

CODEOWNERS have been resolved as:

manifests/cpp.yml                                                       @DataDog/dd-trace-cpp
manifests/cpp_httpd.yml                                                 @DataDog/dd-trace-cpp
manifests/cpp_nginx.yml                                                 @DataDog/dd-trace-cpp
manifests/dotnet.yml                                                    @DataDog/apm-dotnet @DataDog/asm-dotnet
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
manifests/java_otel.yml                                                 @DataDog/system-tests-core
manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/nodejs_otel.yml                                               @DataDog/system-tests-core
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/python_lambda.yml                                             @DataDog/apm-python @DataDog/asm-python
manifests/python_otel.yml                                               @DataDog/apm-python @DataDog/asm-python
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
manifests/rust.yml                                                      @DataDog/apm-rust
tests/parametric/test_tracer.py                                         @DataDog/system-tests-core @DataDog/apm-sdk-capabilities

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0deeae24c3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

assert root_span is not None, "Root span not found"
assert "_dd.svc_src" not in root_span.get("meta", {})

def test_tracer_srv_src_inherited_on_child_span(self, test_agent: TestAgentAPI, test_library: APMLibrary) -> None:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add manifest gating for new service-source inheritance test

This new parametric test is introduced without corresponding manifest declarations, so it will run by default on every library/version, including ones where this feature is explicitly marked unsupported for sibling tests in the same class (for example manifests/python.yml:1800-1801, manifests/nodejs.yml:2130-2131, manifests/ruby.yml:1557-1558, manifests/cpp.yml:290-291). In this repo, manifest rules control activation/deactivation at collection time (conftest.py::pytest_collection_modifyitems), so missing entries here can cause broad CI regressions outside Java/.NET/Golang support windows.

Useful? React with 👍 / 👎.

@datadog-prod-us1-4
Copy link
Copy Markdown

datadog-prod-us1-4 bot commented Mar 30, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 003d0b7 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

@amarziali amarziali requested review from a team as code owners March 30, 2026 09:18
@amarziali amarziali requested review from r1viollet, taegyunkim and xlamorlette-datadog and removed request for a team March 30, 2026 09:18
Copy link
Copy Markdown

@pabloerhard pabloerhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't this behavior something we only wanted for tracers in which spans inherit service name from their parent spans?

@amarziali
Copy link
Copy Markdown
Contributor Author

amarziali commented Mar 30, 2026

Wasn't this behavior something we only wanted for tracers in which spans inherit service name from their parent spans?

no worries, in this case, like for other tests, we can use irrelevant to exclude specific tracers (like node) from running this test. But it's still valuable to keep it enforced cross tracer for the ones that have this feature

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