Skip to content

support v3 in fakeintake#51150

Draft
atanzu wants to merge 3 commits into
mainfrom
mark.kirichenko/support-v3-in-fakeintake
Draft

support v3 in fakeintake#51150
atanzu wants to merge 3 commits into
mainfrom
mark.kirichenko/support-v3-in-fakeintake

Conversation

@atanzu
Copy link
Copy Markdown
Contributor

@atanzu atanzu commented May 21, 2026

What does this PR do?

Allow us to test V3 payloads with fakeintake.

Motivation

Current e2e test setup doesn't support the V3 payload format. We want to address this gap.

We add V3 metrics intake support, which relies on the V3 parser from dogstatsd-http. We cannot import this module directly, so we use a copy of it.

Describe how you validated your changes

We add new e2e tests for our usual metrics and for OTel data which verify that we can send data to a V3 endpoint instead of V2.

Additional Notes

@github-actions
Copy link
Copy Markdown
Contributor

@codex review

@github-actions github-actions Bot added the long review PR is complex, plan time to review it label May 21, 2026
@datadog-prod-us1-5
Copy link
Copy Markdown
Contributor

datadog-prod-us1-5 Bot commented May 21, 2026

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 6 Pipeline jobs failed

DataDog/datadog-agent | new-e2e-gpu: [--run TestGPUK8sSuiteUbuntu2204]   View in Datadog   GitLab

🔄 Retry job. This looks flaky and may succeed on retry. Error installing dependencies. Cannot install 'go' and 'kubectl' due to timeouts and store issues.

DataDog/datadog-agent | new-e2e-ha-agent-failover   View in Datadog   GitLab

🔄 Retry job. This looks flaky and may succeed on retry. TestHAAgentFailoverSuite failed: Could not fetch metadata payload: dial tcp 127.0.0.1:5001: connect: connection refused

DataDog/datadog-agent | new-e2e-otel   View in Datadog   GitLab

🔄 Retry job. This looks flaky and may succeed on retry. 3 failed tests. Error: v3 payload unmarshal: unexpected EOF. Messages: OTLP counter must reach V3 endpoint (/api/intake/metrics/v3/series)

View all 6 failed jobs.

ℹ️ Info

🎯 Code Coverage (details)
Patch Coverage: 11.72%
Overall Coverage: 50.23% (-0.13%)

Useful? React with 👍 / 👎

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

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: 69873fff60

ℹ️ 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".

"/api/v1/check_run": getCheckRunPayLoadJSON,
"/api/v1/connections": getConnectionsPayLoadProtobuf,
"/api/beta/sketches": getSketchPayloadProtobuf,
"/api/intake/metrics/v3/series": getMetricV3SeriesPayload,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Register V3 sketches route alongside V3 series

This change enables serializer_experimental_use_v3_api.sketches.endpoints (host and Helm paths), so when V3 is turned on the agent sends sketch payloads to /api/intake/metrics/v3/sketches; however fakeintake only adds a parser for /api/intake/metrics/v3/series here, and FilterSketches() still reads /api/beta/sketches. In V3 mode, distribution/sketch assertions will therefore silently see no data even though payloads are being sent, which breaks end-to-end metric coverage for sketches.

Useful? React with 👍 / 👎.

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented May 21, 2026

Files inventory check summary

File checks results against ancestor 5d847224:

Results for datadog-agent_7.81.0~devel.git.105.ca9624c.pipeline.114521494-1_amd64.deb:

No change detected

@atanzu atanzu force-pushed the mark.kirichenko/support-v3-in-fakeintake branch from 69873ff to 46d4a45 Compare May 21, 2026 11:35
@github-actions
Copy link
Copy Markdown
Contributor

@codex review

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: 46d4a4504b

ℹ️ 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".

"/api/v1/check_run": getCheckRunPayLoadJSON,
"/api/v1/connections": getConnectionsPayLoadProtobuf,
"/api/beta/sketches": getSketchPayloadProtobuf,
"/api/intake/metrics/v3/series": getMetricV3SeriesPayload,
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 Parse V3 sketches when V3 metrics mode is enabled

This map adds /api/intake/metrics/v3/series but leaves out /api/intake/metrics/v3/sketches, even though WithV3MetricsEnabled now configures both series and sketches V3 endpoints. In that configuration, sketch payloads are sent to the V3 sketches route (comp/forwarder/defaultforwarder/endpoints/endpoints.go) and fakeintake won’t decode them (and FilterSketches still reads /api/beta/sketches), so sketch-based assertions under V3 mode silently miss data. Either add V3-sketch parsing/client support or stop enabling the sketches V3 endpoint until that support exists.

Useful? React with 👍 / 👎.

@atanzu atanzu changed the title Mark.kirichenko/support v3 in fakeintake support v3 in fakeintake May 21, 2026
@atanzu atanzu force-pushed the mark.kirichenko/support-v3-in-fakeintake branch from 46d4a45 to b2b4d07 Compare May 21, 2026 12:17
@github-actions
Copy link
Copy Markdown
Contributor

@codex review

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

ℹ️ 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".

"/api/v1/check_run": getCheckRunPayLoadJSON,
"/api/v1/connections": getConnectionsPayLoadProtobuf,
"/api/beta/sketches": getSketchPayloadProtobuf,
"/api/intake/metrics/v3/series": getMetricV3SeriesPayload,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add V3 sketches route parsing to fakeintake

When V3 is enabled, the new config paths set both series and sketches V3 endpoints to fakeintake, so sketch payloads are sent to /api/intake/metrics/v3/sketches. This parser map only adds /api/intake/metrics/v3/series, so V3 sketch payloads remain unparsed and FilterSketches() (which still reads /api/beta/sketches) will silently miss them. Any V3-enabled tests asserting distributions/sketches can therefore fail or give false negatives.

Useful? React with 👍 / 👎.

@atanzu atanzu force-pushed the mark.kirichenko/support-v3-in-fakeintake branch from b2b4d07 to 8995a94 Compare May 21, 2026 13:32
@github-actions
Copy link
Copy Markdown
Contributor

@codex review

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: 8995a94b17

ℹ️ 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 on lines +367 to +369
sketches:
endpoints:
- %[3]s://%[1]s:%[2]d
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 Stop rerouting sketches until fakeintake can read v3 sketches

This option now enables serializer_experimental_use_v3_api.sketches.endpoints, which redirects sketch/distribution traffic to /api/intake/metrics/v3/sketches, but fakeintake still has no corresponding v3-sketch retrieval path (FilterSketches still queries /api/beta/sketches, and there is no /api/intake/metrics/v3/sketches handler in serverstore/parser.go). As soon as a v3-enabled test needs to assert sketch metrics, it will get empty results despite sketches being sent.

Useful? React with 👍 / 👎.

@atanzu atanzu force-pushed the mark.kirichenko/support-v3-in-fakeintake branch from 8995a94 to ca9624c Compare May 21, 2026 14:48
@github-actions
Copy link
Copy Markdown
Contributor

@codex review

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

ℹ️ 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 on lines +367 to +369
sketches:
endpoints:
- %[3]s://%[1]s:%[2]d
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 Don’t enable V3 sketches without fakeintake sketch support

This now configures serializer_experimental_use_v3_api.sketches.endpoints, so sketch/distribution payloads are sent to /api/intake/metrics/v3/sketches, but fakeintake still only exposes sketch parsing/querying on /api/beta/sketches (FilterSketches/GetSketchNames in test/fakeintake/client/client.go). In suites that enable V3 and assert on sketch metrics, those assertions will incorrectly see no data because sketches have been rerouted to an unsupported endpoint.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant