open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
4.51k stars 1.48k forks source link

Make pprofile attribute table a real slice #11706

Closed dmathieu closed 3 days ago

dmathieu commented 6 days ago

Description

AttributeTable was setup as a map of attributes, same as they are used in traces. However, for profiles, they have a different meaning. They store a slice of attributes, and samples will point to the index of each attribute rather than duplicate the value.

So this can't be a map, it must be a slice of key/values, which can be duplicated and need a reliable index.

See https://github.com/open-telemetry/opentelemetry-proto/blob/793e43e25f2eb8063c2693bc2e66e16672cf7ed8/opentelemetry/proto/profiles/v1development/profiles.proto#L204-L205

cc @mx-psi

codecov[bot] commented 6 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.57%. Comparing base (c42139c) to head (f8fe840). Report is 20 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #11706 +/- ## ========================================== + Coverage 91.54% 91.57% +0.02% ========================================== Files 442 444 +2 Lines 23792 23873 +81 ========================================== + Hits 21780 21861 +81 Misses 1641 1641 Partials 371 371 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

dmathieu commented 3 days ago

Superseded by https://github.com/open-telemetry/opentelemetry-collector/pull/11722