Skip to content

[parametric] Add version as aggregation key dimension in test_distinct_aggregationkeys_TS003#6869

Open
ajgajg1134 wants to merge 6 commits into
mainfrom
andrew.glaude/versionCSS
Open

[parametric] Add version as aggregation key dimension in test_distinct_aggregationkeys_TS003#6869
ajgajg1134 wants to merge 6 commits into
mainfrom
andrew.glaude/versionCSS

Conversation

@ajgajg1134

@ajgajg1134 ajgajg1134 commented May 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extends test_distinct_aggregationkeys_TS003 to cover version as the 7th distinct stats aggregation key dimension
  • Adds a span with a per-span version meta tag (version=v1.0.0) alongside the existing 6 dimensions (service, name, resource, type, http_status_code, synthetics)
  • Updates the count assertion from 7 → 8 entries

Motivation

This test was written to catch a bug in dd-trace-go v2.8.0 (DataDog/dd-trace-go#4734) where the client-side stats concentrator ignored per-span version meta tags and collapsed all spans into a version="" bucket. The bug was introduced when /info polling was added to dynamically activate client-side stats — the concentrator's aggregation key was initialized once at construction time from global config, never reading per-span version tags.

Verified:

Test plan

  • Run TEST_LIBRARY=golang ./run.sh PARAMETRIC -k test_distinct_aggregationkeys_TS003 against default tracer → FAIL (confirms bug detection)
  • Run same test with binaries/golang-load-from-go-get pointing to fix commit 5655505e021b40ea2839bc8dda482ec19483047a → PASS (confirms fix validation)

🤖 Generated with Claude Code

…gregationkeys_TS003

Extends TS003 to cover per-span version tags as a distinct stats aggregation
key. Catches the bug introduced in dd-trace-go v2.8.0 (fixed in PR #4734)
where the client-side stats concentrator ignored per-span version meta and
collapsed all spans into a version="" bucket.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@ajgajg1134 ajgajg1134 requested review from a team as code owners May 6, 2026 19:40
@ajgajg1134 ajgajg1134 requested review from zacharycmontoya and removed request for a team May 6, 2026 19:40
@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
tests/parametric/test_library_tracestats.py                             @DataDog/system-tests-core @DataDog/apm-sdk-capabilities

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

Copy link
Copy Markdown

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: aa00140f19

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/parametric/test_library_tracestats.py
@datadog-official

datadog-official Bot commented May 6, 2026

Copy link
Copy Markdown

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 5 Pipeline jobs failed

Testing the test | System Tests (dotnet, dev) / parametric / parametric (1)   View in Datadog   GitHub Actions

🧪 1 Test failed

tests.parametric.test_library_tracestats.Test_Library_Tracestats.test_distinct_aggregationkeys_TS003[agent_env0-library_env0, parametric-dotnet] from system_tests_suite   View in Datadog
assert 2 == 1

self = &lt;tests.parametric.test_library_tracestats.Test_Library_Tracestats object at 0x7f1c88b38350&gt;
test_agent = &lt;utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f1c56921370&gt;
test_library = &lt;utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f1c561b1880&gt;

    @enable_tracestats()
    @enable_agent_version()
    def test_distinct_aggregationkeys_TS003(self, test_agent: TestAgentAPI, test_library: APMLibrary):
        &#34;&#34;&#34;When spans are created with a unique set of dimensions
...

Testing the test | System Tests (dotnet, prod) / parametric / parametric (1)   View in Datadog   GitHub Actions

🧪 1 Test failed

tests.parametric.test_library_tracestats.Test_Library_Tracestats.test_distinct_aggregationkeys_TS003[agent_env0-library_env0, parametric-dotnet] from system_tests_suite   View in Datadog
assert 2 == 1

self = &lt;tests.parametric.test_library_tracestats.Test_Library_Tracestats object at 0x7f86761bf6b0&gt;
test_agent = &lt;utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7f86436a6450&gt;
test_library = &lt;utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7f8643606630&gt;

    @enable_tracestats()
    @enable_agent_version()
    def test_distinct_aggregationkeys_TS003(self, test_agent: TestAgentAPI, test_library: APMLibrary):
        &#34;&#34;&#34;When spans are created with a unique set of dimensions
...

Testing the test | System Tests (java, dev) / parametric / parametric (1)   View in Datadog   GitHub Actions

🧪 1 Test failed

tests.parametric.test_library_tracestats.Test_Library_Tracestats.test_distinct_aggregationkeys_TS003[agent_env0-library_env0, parametric-java] from system_tests_suite   View in Datadog
assert 2 == 1

self = &lt;tests.parametric.test_library_tracestats.Test_Library_Tracestats object at 0x7feba9277ad0&gt;
test_agent = &lt;utils.docker_fixtures._test_agent.TestAgentAPI object at 0x7feb74ee8b00&gt;
test_library = &lt;utils.docker_fixtures._test_clients._test_client_parametric.ParametricTestClientApi object at 0x7feb74ef7dd0&gt;

    @enable_tracestats()
    @enable_agent_version()
    def test_distinct_aggregationkeys_TS003(self, test_agent: TestAgentAPI, test_library: APMLibrary):
        &#34;&#34;&#34;When spans are created with a unique set of dimensions
...

View all 5 failed jobs.

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ca80226 | Docs | Datadog PR Page | Give us feedback!

…-rc.2

Per-span version tag support in client-side stats aggregation key was
fixed in dd-trace-go#4734 and released in v2.8.2-rc.2. Gate the new
version dimension assertion so CI does not fail on older tracer builds.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@ajgajg1134 ajgajg1134 requested a review from a team as a code owner May 8, 2026 16:34
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