Skip to content

[pkg/xreceiverhelper] Report profile sample metrics per sample type - #16251

Merged
codeboten merged 16 commits into
open-telemetry:mainfrom
florianl:florianl/profiles-receiver-counts
Nov 6, 2026
Merged

codeboten merged 16 commits into
open-telemetry:mainfrom
florianl:florianl/profiles-receiver-counts

Conversation

@florianl

Copy link
Copy Markdown
Member

Description

Add ObsReport.EndProfilesOpBySampleType and ProfileSampleCountsByType so otelcol_receiver_{accepted,refused,failed}_profile_samples can carry a sample_type attribute. Use it in the OTLP receiver.

A single OTLP profiles payload can hold several profiles with different sample types, e.g. CPU samples, off-CPU time and allocations. A plain sample count adds all of them together. It can't show which kind of profile data was accepted or lost, and it mixes samples whose values mean different things (e.g. "samples:count" vs "off_cpu:nanoseconds"). Tagging the counters with the sample type, as "type:unit", shows which profile types were affected by refused or failed requests. It also shows how much of each type the receiver ingests.

Link to tracking issue

Fixes #

Testing

Documentation

Authorship

  • I, a human, wrote this pull request description myself.

Add ObsReport.EndProfilesOpBySampleType and ProfileSampleCountsByType so
otelcol_receiver_{accepted,refused,failed}_profile_samples can carry a
sample_type attribute. Use it in the OTLP receiver.

Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.37%. Comparing base (08618bc) to head (6fe0cb5).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16251      +/-   ##
==========================================
+ Coverage   91.35%   91.37%   +0.01%     
==========================================
  Files         760      762       +2     
  Lines       50704    50772      +68     
==========================================
+ Hits        46322    46394      +72     
+ Misses       3031     3029       -2     
+ Partials     1351     1349       -2     

☔ 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.

Comment thread receiver/receiverhelper/obsreport.go Resolved
Comment thread receiver/receiverhelper/obsreport.go Resolved
…ndices

Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
Comment thread receiver/receiverhelper/obsreport.go Resolved
…receiverhelper

Profiles are not a stable signal, so the new EndProfilesOpBySampleType and
ProfileSampleCountsByType APIs live in a new xreceiverhelper module instead of
receiverhelper. The signal-agnostic parts of endOp move to receiverhelper's
internal package so both modules share them.

Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
Comment thread .github/CODEOWNERS Resolved
Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
@florianl
florianl requested a review from jmacd as a code owner October 30, 2026 09:53
…eiver

Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>

@songy23 songy23 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.

LGTM

@dmathieu dmathieu added the ready-to-merge Code review completed; ready to merge by maintainers label Oct 30, 2026
@dmathieu

Copy link
Copy Markdown
Member

Could you fix the PR title? This is now in xreceiverhelper.

@florianl florianl changed the title [receiver/receiverhelper] Report profile sample metrics per sample type [pkg/xreceiverhelper] Report profile sample metrics per sample type Oct 30, 2026
Signed-off-by: Florian Lehner <florian.lehner@datadoghq.com>

@codeboten codeboten 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.

One more merge conflict to resolve

@florianl

This comment was marked as resolved.

@songy23

songy23 commented Nov 6, 2026

Copy link
Copy Markdown
Member

should be good to merge

@codeboten
codeboten added this pull request to the merge queue Nov 6, 2026
Merged via the queue into open-telemetry:main with commit 9b35cca Nov 6, 2026
121 of 126 checks passed
@github-actions github-actions Bot added this to the next release milestone Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants