Skip to content

feat(appsec/proxy): add metrics#4072

Merged
dd-mergequeue[bot] merged 5 commits into
mainfrom
flavien/proxies/metrics
Oct 29, 2025
Merged

feat(appsec/proxy): add metrics#4072
dd-mergequeue[bot] merged 5 commits into
mainfrom
flavien/proxies/metrics

Conversation

@e-n-0

@e-n-0 e-n-0 commented Oct 24, 2025

Copy link
Copy Markdown
Member

What does this PR do?

This PR implement the collection of metrics for appsec proxies:

  • collect environment variables value (and origin: default or custom set)
  • collect message processor configuration at the first request received
  • collect body size of request/response body messages processed

As the telemetry package is internal and the environment variables are set inside the contribs, the method TelemetryRegisterAppConfig and the telemetry origin have been exposed inside the instrumentation package.*

Related

PR that adds the metrics to dd-go.

Motivation

More visibility into the usage of the product.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running ./scripts/lint.sh locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@pr-commenter

pr-commenter Bot commented Oct 24, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-10-28 13:47:43

Comparing candidate commit 82e25fa in PR branch flavien/proxies/metrics with baseline commit 399a58b in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.

@e-n-0
e-n-0 force-pushed the flavien/proxies/metrics branch from a3225ba to fdb5775 Compare October 27, 2025 17:22
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Oct 27, 2025

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: 82e25fa | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@github-actions github-actions Bot added the apm:ecosystem contrib/* related feature requests or bugs label Oct 27, 2025
@e-n-0
e-n-0 marked this pull request as ready for review October 27, 2025 17:33
@e-n-0
e-n-0 requested review from a team as code owners October 27, 2025 17:33
@e-n-0

e-n-0 commented Oct 27, 2025

Copy link
Copy Markdown
Member Author

Waiting for the changes merge in dd-go to update the metric values in this PR.

@e-n-0
e-n-0 marked this pull request as draft October 27, 2025 17:33
@e-n-0
e-n-0 force-pushed the flavien/proxies/metrics branch from a7236b2 to e30f288 Compare October 27, 2025 19:23
@e-n-0
e-n-0 marked this pull request as ready for review October 27, 2025 21:16
@e-n-0

e-n-0 commented Oct 27, 2025

Copy link
Copy Markdown
Member Author

Reopened the PR as PR in dd-go merged.

@e-n-0
e-n-0 requested a review from genesor October 28, 2025 11:02
@e-n-0
e-n-0 requested a review from eliottness October 29, 2025 10:26
@eliottness

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

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

@e-n-0

e-n-0 commented Oct 29, 2025

Copy link
Copy Markdown
Member Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Oct 29, 2025

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2025-10-29 11:47:15 UTC ℹ️ Start processing command /merge


2025-10-29 11:47:20 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 18m (p90).


2025-10-29 12:02:12 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue
dd-mergequeue Bot merged commit b2a4cee into main Oct 29, 2025
269 of 273 checks passed
@dd-mergequeue
dd-mergequeue Bot deleted the flavien/proxies/metrics branch October 29, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs mergequeue-status: done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants