Skip to content

Conversation

@florianl
Copy link
Contributor

@florianl florianl commented Nov 19, 2025

Description

pcommon.Timestamp better represents a point in time rather than a duration. So keeping the proto field type for DurationNano is a better fit.

Corresponding Collector-contrib change: open-telemetry/opentelemetry-collector-contrib#44397

ping @open-telemetry/profiling-approvers

Link to tracking issue

Fixes #

Testing

Documentation

pcommon.Timestamp better represents a point in time rather than a duration. So
keeping the proto field type for DurationNano is a better fit.

Signed-off-by: Florian Lehner <[email protected]>
@dmathieu
Copy link
Member

Could you also open the -contrib PR that fixes the tests there?

@florianl
Copy link
Contributor Author

Could you also open the -contrib PR that fixes the tests there?

open-telemetry/opentelemetry-collector-contrib#44397

Signed-off-by: Florian Lehner <[email protected]>
Signed-off-by: Florian Lehner <[email protected]>
Signed-off-by: Florian Lehner <[email protected]>
Signed-off-by: Florian Lehner <[email protected]>
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.14%. Comparing base (587a7d2) to head (d6c4e86).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #14188   +/-   ##
=======================================
  Coverage   92.13%   92.14%           
=======================================
  Files         666      666           
  Lines       41438    41441    +3     
=======================================
+ Hits        38180    38186    +6     
+ Misses       2218     2216    -2     
+ Partials     1040     1039    -1     

☔ View full report in Codecov by Sentry.
📢 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.

Signed-off-by: Florian Lehner <[email protected]>
Signed-off-by: Florian Lehner <[email protected]>
attribute.NewSet(
attribute.String(obsconsumer.ComponentOutcome, "success"),
): 1186,
): 1118,
Copy link
Member

Choose a reason for hiding this comment

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

For my understanding, why did the numbers on this file changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If my understanding is correct, this number represents the size of pdata and with the change, pdata for profiling shrinked.

Copy link
Member

Choose a reason for hiding this comment

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

Because it goes from a timestamp to an int.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, makes sense! Thanks

@mx-psi mx-psi added this pull request to the merge queue Nov 20, 2025
Merged via the queue into open-telemetry:main with commit 40c567e Nov 20, 2025
59 of 60 checks passed
@mx-psi
Copy link
Member

mx-psi commented Nov 21, 2025

open-telemetry/opentelemetry-collector-contrib/pull/44446 needs your help to address the deprecations

mx-psi added a commit to open-telemetry/opentelemetry-collector-contrib that referenced this pull request Nov 24, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Complementary change to
open-telemetry/opentelemetry-collector#14188.

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Signed-off-by: Florian Lehner <[email protected]>
Co-authored-by: Vihas Makwana <[email protected]>
Co-authored-by: Pablo Baeyens <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 25, 2025
#### Description

The `Duration` and `SetDuration` methods were deprecated in #14188, and
their implementations are now no-ops, causing [a benchmark to
fail](https://github.com/open-telemetry/opentelemetry-collector/actions/runs/19668308741/job/56330560134).
I updated the benchmark to use `DurationNano` and `SetDurationNano`
instead.
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.

3 participants