diff --git a/.chloggen/profiles-symb-level.yaml b/.chloggen/profiles-symb-level.yaml new file mode 100755 index 0000000000..ddd92b4fe7 --- /dev/null +++ b/.chloggen/profiles-symb-level.yaml @@ -0,0 +1,22 @@ +# Use this changelog template to create an entry for release notes. +# +# If your change doesn't affect end users you should instead start +# your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db) +component: pprof + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduce pprof attributes. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +# The values here must be integers. +issues: [2522] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 26410bc65d..d695abf738 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -135,6 +135,7 @@ # Profiling semantic conventions /docs/general/profiles.md @open-telemetry/specs-semconv-approvers @open-telemetry/profiling-approvers /model/profile/ @open-telemetry/specs-semconv-approvers @open-telemetry/profiling-approvers +/model/pprof/ @open-telemetry/specs-semconv-approvers @open-telemetry/profiling-approvers # SDK health semantic conventions /docs/otel/ @open-telemetry/specs-semconv-approvers @open-telemetry/semconv-sdk-health-approvers diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 2112d90db5..1f51c1d4c4 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -77,6 +77,7 @@ body: - area:os - area:otel - area:peer + - area:pprof - area:process - area:profile - area:rpc diff --git a/.github/ISSUE_TEMPLATE/change_proposal.yaml b/.github/ISSUE_TEMPLATE/change_proposal.yaml index c0999b4bc0..cdbef31ba0 100644 --- a/.github/ISSUE_TEMPLATE/change_proposal.yaml +++ b/.github/ISSUE_TEMPLATE/change_proposal.yaml @@ -69,6 +69,7 @@ body: - area:os - area:otel - area:peer + - area:pprof - area:process - area:profile - area:rpc diff --git a/.github/ISSUE_TEMPLATE/new-conventions.yaml b/.github/ISSUE_TEMPLATE/new-conventions.yaml index 2e8c7b7293..da5523b837 100644 --- a/.github/ISSUE_TEMPLATE/new-conventions.yaml +++ b/.github/ISSUE_TEMPLATE/new-conventions.yaml @@ -80,6 +80,7 @@ body: - area:os - area:otel - area:peer + - area:pprof - area:process - area:profile - area:rpc diff --git a/docs/general/profiles.md b/docs/general/profiles.md index da06b95381..3c73de87b5 100644 --- a/docs/general/profiles.md +++ b/docs/general/profiles.md @@ -2,20 +2,24 @@ linkTitle: Profiles ---> -# General profiles attributes +# Profiles attributes **Status**: [Development][DocumentStatus] -- [Frame types](#frame-types) +- [General profiles identification attributes](#general-profiles-identification-attributes) + - [Frame types](#frame-types) +- [Compatibility with pprof](#compatibility-with-pprof) +## General profiles identification attributes + The attributes described in this section are rather generic. They may be used in any Profiles record they apply to. -## Frame types +### Frame types **Description:** Describes the origin of a single frame in a Profile. @@ -54,4 +58,34 @@ They may be used in any Profiles record they apply to. +## Compatibility with pprof + +Existing [pprof][pprofLink] formats can be unambiguously mapped to this data +model. Reverse mapping from this data model is also possible to the extent that +the target profiles format has equivalent capabilities. + +The attributes described in this section are specific to support convertibility. +They may be used in any Profiles record they apply to. + + + + + + + + +| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability | +|---|---|---|---|---|---| +| [`pprof.location.is_folded`](/docs/registry/attributes/pprof.md) | boolean | Provides an indication that multiple symbols map to this location's address, for example due to identical code folding by the linker. In that case the line information represents one of the multiple symbols. This field must be recomputed when the symbolization state of the profile changes. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`pprof.mapping.has_filenames`](/docs/registry/attributes/pprof.md) | boolean | Indicates that there are filenames related to this mapping. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`pprof.mapping.has_functions`](/docs/registry/attributes/pprof.md) | boolean | Indicates that there are functions related to this mapping. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`pprof.mapping.has_inline_frames`](/docs/registry/attributes/pprof.md) | boolean | Indicates that there are inline frames related to this mapping. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | +| [`pprof.mapping.has_line_numbers`](/docs/registry/attributes/pprof.md) | boolean | Indicates that there are line numbers related to this mapping. | | `Recommended` | ![Development](https://img.shields.io/badge/-development-blue) | + + + + + + [DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status +[pprofLink]: https://github.com/google/pprof diff --git a/docs/registry/attributes/README.md b/docs/registry/attributes/README.md index 12c8d61416..e999e1db7a 100644 --- a/docs/registry/attributes/README.md +++ b/docs/registry/attributes/README.md @@ -87,6 +87,7 @@ Currently, the following namespaces exist: - [OS](os.md) - [OTel](otel.md) - [Peer](peer.md) +- [Pprof](pprof.md) - [Process](process.md) - [Profile](profile.md) - [RPC](rpc.md) diff --git a/docs/registry/attributes/pprof.md b/docs/registry/attributes/pprof.md new file mode 100644 index 0000000000..bc964a4aed --- /dev/null +++ b/docs/registry/attributes/pprof.md @@ -0,0 +1,16 @@ + + + +# Pprof + +## Pprof specific attributes for the Profiling signal + +Attributes specific to pprof that help convert from pprof to Profiling signal. + +| Attribute | Type | Description | Examples | Stability | +|---|---|---|---|---| +| `pprof.location.is_folded` | boolean | Provides an indication that multiple symbols map to this location's address, for example due to identical code folding by the linker. In that case the line information represents one of the multiple symbols. This field must be recomputed when the symbolization state of the profile changes. | | ![Development](https://img.shields.io/badge/-development-blue) | +| `pprof.mapping.has_filenames` | boolean | Indicates that there are filenames related to this mapping. | | ![Development](https://img.shields.io/badge/-development-blue) | +| `pprof.mapping.has_functions` | boolean | Indicates that there are functions related to this mapping. | | ![Development](https://img.shields.io/badge/-development-blue) | +| `pprof.mapping.has_inline_frames` | boolean | Indicates that there are inline frames related to this mapping. | | ![Development](https://img.shields.io/badge/-development-blue) | +| `pprof.mapping.has_line_numbers` | boolean | Indicates that there are line numbers related to this mapping. | | ![Development](https://img.shields.io/badge/-development-blue) | diff --git a/model/pprof/common.yaml b/model/pprof/common.yaml new file mode 100644 index 0000000000..5a855d56b4 --- /dev/null +++ b/model/pprof/common.yaml @@ -0,0 +1,17 @@ +groups: + + - id: pprof + type: attribute_group + brief: > + Attributes specific to pprof that help convert from pprof to Profiling signal. + attributes: + - ref: pprof.mapping.has_functions + requirement_level: recommended + - ref: pprof.mapping.has_filenames + requirement_level: recommended + - ref: pprof.mapping.has_line_numbers + requirement_level: recommended + - ref: pprof.mapping.has_inline_frames + requirement_level: recommended + - ref: pprof.location.is_folded + requirement_level: recommended diff --git a/model/pprof/registry.yaml b/model/pprof/registry.yaml new file mode 100644 index 0000000000..5e7c2dd3a5 --- /dev/null +++ b/model/pprof/registry.yaml @@ -0,0 +1,37 @@ +groups: + + - id: registry.pprof + type: attribute_group + display_name: Pprof specific attributes for the Profiling signal + brief: > + Attributes specific to pprof that help convert from pprof to Profiling signal. + attributes: + - id: pprof.mapping.has_functions + brief: > + Indicates that there are functions related to this mapping. + type: boolean + stability: development + - id: pprof.mapping.has_filenames + brief: > + Indicates that there are filenames related to this mapping. + type: boolean + stability: development + - id: pprof.mapping.has_line_numbers + brief: > + Indicates that there are line numbers related to this mapping. + type: boolean + stability: development + - id: pprof.mapping.has_inline_frames + brief: > + Indicates that there are inline frames related to this mapping. + type: boolean + stability: development + - id: pprof.location.is_folded + brief: > + Provides an indication that multiple symbols map to this location's + address, for example due to identical code folding by the linker. In + that case the line information represents one of the multiple symbols. + This field must be recomputed when the symbolization state of the + profile changes. + stability: development + type: boolean