Fix profiles data model attribute count parameter name and timestamp doc unit
Description
ProfileData.create(...)'s 11th parameter is nameddroppedAttributesCount, but the value is exposed viagetTotalAttributeCount()andProfileMarshalerderives dropped from it (getTotalAttributeCount() - getAttributeIndices().size()). It holds the total, not the dropped count, so the name misleads callers. Rename it tototalAttributeCount.- This matches the Span family, where marshalers compute
droppedAttributesCount = getTotalAttributeCount() - getAttributes().size()(e.g.SpanMarshaler,LogStatelessMarshaler). SampleData.getTimestamps()javadoc said "represented in ms", butSampleMarshalerserializes totimestamps_unix_nanoand the timestamps must fall within the profile's nanosecond range (ProfileData.getTimeNanos()). Fix the unit to nanoseconds.
Testing done
- Docs/naming only — no behavior, signature, or wire-output change; test-exempt. Parameter names are not part of the binary signature, so japicmp shows no diff and no
docs/apidiffsupdate is needed. Not user-facing, so no CHANGELOG entry. ./gradlew :sdk:profiles:checkpassed (test + spotlessCheck + ErrorProne/NullAway + jApiCmp).
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 78.77%. Comparing base (824334c) to head (f8da8a8).
:warning: Report is 46 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #8514 +/- ##
=========================================
Coverage 78.77% 78.77%
Complexity 8579 8579
=========================================
Files 1009 1009
Lines 28993 28993
Branches 3599 3599
=========================================
Hits 22839 22839
Misses 5311 5311
Partials 843 843
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.
Thank you for your contribution @thswlsqls! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.