Skip to content

pprof: add scope attributes for sample type ordering and defaults - #3368

Merged
joaopgrassi merged 4 commits into
open-telemetry:mainfrom
aalexand:pprof-order
Feb 12, 2026
Merged

joaopgrassi merged 4 commits into
open-telemetry:mainfrom
aalexand:pprof-order

Conversation

@aalexand

@aalexand aalexand commented Feb 2, 2026

Copy link
Copy Markdown
Member

Changes

The change adds two new pprof-specific attributes to support the lossless conversion between pprof and OTel profile formats. These attributes address the handling of pprof's default_sample_type and the preservation of the original sample type order.

New attributes:

  • pprof.scope.default_sample_type: Records the default_sample_type from the original pprof profile.
  • pprof.scope.sample_type_order: Records the indices of the sample types in the original profile to allow exact reconstruction of the pprof sample type array.

The new attributes use the pprof.scope.* naming to clearly indicate they apply to the ScopeProfiles level. This is similar naming-wise with the existing pprof.mapping.* and pprof.location.* attributes while avoiding ambiguity with pprof.profile.* (which applies to individual Profile messages).

For more details see the original design notes.

The change adds two new pprof-specific attributes to support the
lossless conversion between pprof and OTel profile formats. These
attributes address the handling of pprof's `default_sample_type` and the
preservation of the original sample type order.

New attributes:
- `pprof.scope.default_sample_type`: Records the default_sample_type from
  the original pprof profile.
- `pprof.scope.sample_type_order`: Records the indices of the sample types
  in the original profile to allow exact reconstruction of the pprof
  sample type array.

The new attributes use the `pprof.scope.*` naming to clearly indicate
they apply to the `ScopeProfiles` level. This is similar naming-wise
with the existing `pprof.mapping.*` and `pprof.location.*` attributes
while avoiding ambiguity with `pprof.profile.*` (which applies to
individual Profile messages).

For more details see the original [design
notes](https://docs.google.com/document/d/1CF_xg0AFBGyFhkL1hdSSaOXW4pLApg39PwYdcM0xVW8/edit?tab=t.0).
@aalexand

aalexand commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

@open-telemetry/profiling-approvers @florianl FYI

@joaopgrassi joaopgrassi moved this from Untriaged to Awaiting codeowners approval in Semantic Conventions Triage Feb 2, 2026
Comment thread model/pprof/registry.yaml Resolved
Comment thread model/pprof/registry.yaml Resolved
aalexand and others added 2 commits February 5, 2026 15:52
Co-authored-by: Christos Kalkanis <christos.kalkanis@elastic.co>
Co-authored-by: Christos Kalkanis <christos.kalkanis@elastic.co>
@github-project-automation github-project-automation Bot moved this from Awaiting codeowners approval to Needs More Approval in Semantic Conventions Triage Feb 6, 2026
@lmolkova lmolkova moved this from Needs More Approval to Ready to be Merged in Semantic Conventions Triage Feb 9, 2026
@joaopgrassi
joaopgrassi added this pull request to the merge queue Feb 12, 2026
Merged via the queue into open-telemetry:main with commit 2405522 Feb 12, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants