Skip to content

Add exporter data model impl for profiling signal type.#6498

Merged
jack-berg merged 2 commits intoopen-telemetry:mainfrom
jhalliday:jh-profiling-b
Jul 8, 2024
Merged

Add exporter data model impl for profiling signal type.#6498
jack-berg merged 2 commits intoopen-telemetry:mainfrom
jhalliday:jh-profiling-b

Conversation

@jhalliday
Copy link
Copy Markdown
Contributor

Second step towards supporting the new experimental signal type for profiling...

Following on from the interfaces in #6374 this adds the AutoValue generated implementation classes. Less to discuss here, it's much more straightforward than the interfaces!

  • Still no test coverage, since most of the code is auto generated anyhow. For other similar classes the test coverage is indirect via the Marshaler tests, which for these classes won't be along until the next PR. Meanwhile codecov will probably continue to sulk.

  • The ByteBuffer use in ProfileContainerData presents a challenge. For other similar cases, the mutable object could be wrapped during the static create(...) call with e.g. Collections.unmodifiableList, such that the auto-generated getter can simply return the immutable wrapper. That pattern doesn't work with .asReadOnlyBuffer() since the resulting wrapper object is not immutable, though the content is. For now I've gone with adding an extra getter, as AutoValue won't support overriding the default one. The usability of the resulting API isn't great, but perhaps adequate as the only real use case is the Marshalers and they use it correctly. The alternative design is to disable AutoValue for that class and hand-tool all the getters, but that increases maintenance and cognitive load.

@jhalliday jhalliday requested a review from a team June 4, 2024 15:07
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.64%. Comparing base (56c1879) to head (4332c81).
Report is 34 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6498      +/-   ##
============================================
+ Coverage     90.62%   90.64%   +0.02%     
+ Complexity     6243     6229      -14     
============================================
  Files           683      679       -4     
  Lines         18701    18661      -40     
  Branches       1842     1842              
============================================
- Hits          16948    16916      -32     
+ Misses         1197     1187      -10     
- Partials        556      558       +2     

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

Copy link
Copy Markdown
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Just the one comment about javadoc. Thanks!

…nal type.

javadoc improvements per review feedback.
@jack-berg jack-berg merged commit 6b1092a into open-telemetry:main Jul 8, 2024
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.

2 participants