Skip to content

Add tests for service name process tags#6204

Merged
amarziali merged 5 commits into
mainfrom
andrea.marziali/pt
Feb 6, 2026
Merged

Add tests for service name process tags#6204
amarziali merged 5 commits into
mainfrom
andrea.marziali/pt

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

Motivation

This PR implements tests for Signaling service name source on the process tags (see https://docs.google.com/document/d/1c47iSTWxIOHMHfZTF2nT9xfyQaIBP9KJvI9sRn5SvpM)

The process tags have been improved by adding:

  • svc.user:true when DD_SERVICE is set
  • svc.auto:<svc_name> when DD_SERVICE is not set. The value <svc_name> is set to the default value calculated by the tracer according to each tracer algorithms (i.e. jar name, package.json field name, binary name, etc..)

As a today is only implemented by dd-trace-java from 1.59.0

Changes

  • A new parametric test to test both cases
  • An improved common process tags test to check the presence of the new process tags

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 February 4, 2026 08:25
@amarziali amarziali requested review from mabdinur and removed request for a team February 4, 2026 08:25
@github-actions

github-actions Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/cpp_nginx.yml                                                 @DataDog/system-tests-core
manifests/dotnet.yml                                                    @DataDog/apm-dotnet @DataDog/asm-dotnet
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
tests/apm_tracing_e2e/test_process_tags.py                              @DataDog/system-tests-core
tests/debugger/test_debugger_probe_snapshot.py                          @DataDog/debugger @DataDog/system-tests-core
tests/parametric/test_tracer.py                                         @DataDog/system-tests-core @DataDog/apm-sdk-capabilities
tests/test_profiling.py                                                 @DataDog/system-tests-core
utils/interfaces/_library/miscs.py                                      @DataDog/system-tests-core

@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Feb 4, 2026

Copy link
Copy Markdown

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 63dce1d | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@nccatoni nccatoni left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Checks based on the library name/version outside of the manifests is problematic and should generally be avoided

Comment thread utils/interfaces/_library/miscs.py Outdated
@nccatoni nccatoni requested review from a team as code owners February 4, 2026 16:27
@nccatoni nccatoni requested review from brettlangdon and removed request for a team February 4, 2026 16:27

@tylfin tylfin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Debugger changes LGTM

@amarziali amarziali enabled auto-merge (squash) February 6, 2026 12:28
@amarziali amarziali merged commit 1e93e48 into main Feb 6, 2026
1988 checks passed
@amarziali amarziali deleted the andrea.marziali/pt branch February 6, 2026 14:06
vandonr added a commit to DataDog/dd-trace-dotnet that referenced this pull request Mar 19, 2026
…8106)

## Summary of changes

Implements [Andrea's
specification](https://docs.google.com/document/d/1c47iSTWxIOHMHfZTF2nT9xfyQaIBP9KJvI9sRn5SvpM/edit?tab=t.0#heading=h.uoivahvmuvbg).
TLDR: We need to send in process tags whether the service used is the
one set by the user or the default one.
It was deemed acceptable not to handle the case where the service is set
at the scope level when creating spans, so we focus on service set by
the user through config.

## Reason for change
Service renaming shouldn't rename a service if it's the one set by the
customer but the backend doesn't know that today

## Implementation details
- As the service can be changed in the settings, I moved the process
tags in the `MutableSettings`. As a side effect it simplifies part of
the code as we don't have to pass service tags anymore as they're in
Settings.
- The ProcessTags object is null when the PropagateServiceTag config key
is false. We rely in the rest of the code on whether the tags are null
or not.
- Process tags are still lazily initialized. The `ProcessTags` class is
merely a container of the information needed when you need to serialize
them.

## Test coverage
Utests mainly.
There are system tests to update once merged:
DataDog/system-tests#6204

## Other details
AI generated and polished by hand (and repolished again :p) 

APMLP-1000

---------

Signed-off-by: Pierre Bonet <pierre.bonet@datadoghq.com>
Co-authored-by: Andrew Lock <andrew.lock@datadoghq.com>
Co-authored-by: Raphaël Vandon <raphael.vandon@datadoghq.com>
Co-authored-by: Raphaël Vandon <raphael.vandon@datadog.com>
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.

4 participants