Skip to content

feat(telemetry): add prefix support for opentelemetry metrics - #9720

Open
gray-oni wants to merge 10 commits into
envoyproxy:mainfrom
gray-oni:feat/issue-6859
Open

feat(telemetry): add prefix support for opentelemetry metrics#9720
gray-oni wants to merge 10 commits into
envoyproxy:mainfrom
gray-oni:feat/issue-6859

Conversation

@gray-oni

@gray-oni gray-oni commented Aug 10, 2026

Copy link
Copy Markdown

What this PR does / why we need it:

feat(telemetry): add a new field to opentelemetry sink

This PR adds prefix field to opentelemetry sink settings. So an end-user can setup their envoy metrics with a custom prefix.

Which issue(s) this PR fixes:

Fixes #6859

Example

spec:
  telemetry:
    metrics:
      sinks:
        - type: OpenTelemetry
          openTelemetry:
            host: otel-collector.example.com
            port: 4317
            reportHistogramsAsDeltas: true
            reportCountersAsDeltas: true
            prefix: envoy

PR Checklist

  • Authorship & ownership: Coding agents / AI assistants are welcome, but I have reviewed every change, understand how and why it works, can explain and maintain it, and take full responsibility for this PR. I have not submitted generated output I do not understand.
  • DCO: All commits are signed off (git commit -s). See DCO: Sign your work.
  • API agreed first: If this PR contains API changes (changes under /api), the API was discussed and agreed before the implementation. The API change can be in a separate PR, or in the same PR, but the API must be agreed before implementation. N/A if this PR does not contain API changes.
  • Required checks pass: make generate gen-check, make lint, and the unit-test/coverage build pass. (Flaky e2e failures are not considered breakages, but gen-check, lint, and coverage MUST pass.)
  • Tests added/updated: New/changed code is covered by appropriate tests. N/A if this PR does not contain code changes.
  • Docs: User-facing changes update the docs, either in this PR or a follow-up PR. N/A if this PR does not contain user-facing changes.
  • Release notes: For any non-trivial change, added a release-note fragment under release-notes/current/<section>/<pr-number>-<slug>.md (see release-notes/current/README.md for sections and naming). N/A if this PR does not contain non-trivial changes.
  • Generated files committed: Ran make gen-check and committed the result if API/helm charts/modules changed.
  • Scope & compatibility: The PR is reasonably scoped (no unrelated changes) and preserves backward compatibility, or any breaking change is called out above and documented in release-notes/current/breaking_changes/.
  • Codex review: Requested a Codex review and addressed all of its comments.
  • Copilot review: Requested a Copilot review and addressed all of its comments.

@netlify

netlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 30810b9
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/6a9a78aabe8b8c000842d046
😎 Deploy Preview https://deploy-preview-9720--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gray-oni
gray-oni marked this pull request as ready for review August 10, 2026 18:34
@gray-oni
gray-oni requested a review from a team as a code owner August 10, 2026 18:34

@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: 4acb00d89f

ℹ️ 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 internal/xds/bootstrap/bootstrap.yaml.tpl Outdated
@gray-oni
gray-oni force-pushed the feat/issue-6859 branch 2 times, most recently from e954996 to 7335aa4 Compare August 10, 2026 22:21
@gray-oni

Copy link
Copy Markdown
Author

@codex

@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: 7335aa453d

ℹ️ 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 internal/xds/bootstrap/bootstrap.yaml.tpl
Comment thread api/v1alpha1/envoyproxy_metric_types.go
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.34%. Comparing base (e56c0ff) to head (3b7fd17).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9720      +/-   ##
==========================================
+ Coverage   81.32%   81.34%   +0.01%     
==========================================
  Files         264      264              
  Lines       40964    40969       +5     
==========================================
+ Hits        33315    33326      +11     
+ Misses       7648     7642       -6     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gray-oni

Copy link
Copy Markdown
Author

Hi @zirain, I've seen you in the original issue discussion section. What could be the next steps for me to move forward with this change?

@gray-oni

Copy link
Copy Markdown
Author

It looks like some test suites are flaky and not representative

@gray-oni

Copy link
Copy Markdown
Author

/retest

@gray-oni

Copy link
Copy Markdown
Author

Tests are green. ready for review🙂

@zirain

zirain commented Aug 30, 2026

Copy link
Copy Markdown
Member

can we have a e2e for this?

@gray-oni

Copy link
Copy Markdown
Author

hey @zirain ,Thanks, an e2e test was added

SK added 4 commits August 31, 2026 08:43
Signed-off-by: SK <sergey@grayoni.tech>
Signed-off-by: SK <sergey@grayoni.tech>
Signed-off-by: SK <sergey@grayoni.tech>
Signed-off-by: SK <sergey@grayoni.tech>
zirain
zirain previously approved these changes Aug 31, 2026
@zirain zirain added this to the v1.10.0-rc.1 Release milestone Aug 31, 2026
arkodg
arkodg previously approved these changes Aug 31, 2026
@arkodg

arkodg commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

@gray-oni can you make generate again and commit those changes

Signed-off-by: SK <sergey@grayoni.tech>
@gray-oni
gray-oni dismissed stale reviews from arkodg and zirain via af7fc2f August 31, 2026 08:18
@gray-oni

Copy link
Copy Markdown
Author

@arkodg done, only make manifests had a drift, included in af7fc2f

Signed-off-by: SK <sergey@grayoni.tech>
SK added 2 commits September 1, 2026 22:05
Signed-off-by: SK <sergey@grayoni.tech>
Signed-off-by: SK <sergey@grayoni.tech>
@gray-oni

gray-oni commented Sep 1, 2026

Copy link
Copy Markdown
Author

hey @zirain, I had to resolve conflicts with main. could you trigger CI and re-approve PR if everything looks good?

@gray-oni
gray-oni requested review from arkodg and zirain September 3, 2026 19:45
@gray-oni

gray-oni commented Sep 4, 2026

Copy link
Copy Markdown
Author

/retest

1 similar comment
@zirain

zirain commented Sep 4, 2026

Copy link
Copy Markdown
Member

/retest

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.

Is there some way to add a prefix to metrics?

3 participants