diff --git a/.chloggen/pprof-profile.yaml b/.chloggen/pprof-profile.yaml new file mode 100755 index 0000000000..754afe3d24 --- /dev/null +++ b/.chloggen/pprof-profile.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: add various pprof attributes to support lossless conversion from and to OTel profiles. + +# 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: [3078] + +# (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/docs/general/profiles.md b/docs/general/profiles.md index b52b0aeb08..30948d109b 100644 --- a/docs/general/profiles.md +++ b/docs/general/profiles.md @@ -86,6 +86,12 @@ They may be used in any Profiles record they apply to. | [`pprof.mapping.has_inline_frames`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | boolean | Indicates that there are inline frames related to this mapping. | | | [`pprof.mapping.has_line_numbers`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | boolean | Indicates that there are line numbers related to this mapping. | | | [`pprof.profile.comment`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string[] | Free-form text associated with the profile. This field should not be used to store any machine-readable information, it is only for human-friendly content. | `["hello world", "bazinga"]` | +| [`pprof.profile.default_sample_type`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Type of the preferred sample value. | `cpu` | +| [`pprof.profile.doc_url`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Documentation link for this profile type. [1] | `http://pprof.example.com/cpu-profile.html` | +| [`pprof.profile.drop_frames`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors. | `/foobar/` | +| [`pprof.profile.keep_frames`](/docs/registry/attributes/pprof.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. | `/bazinga/` | + +**[1] `pprof.profile.doc_url`:** The URL must be absolute and may be missing if the profile was generated by code that did not supply a link diff --git a/docs/registry/attributes/pprof.md b/docs/registry/attributes/pprof.md index e080eb6e29..d3192d5d71 100644 --- a/docs/registry/attributes/pprof.md +++ b/docs/registry/attributes/pprof.md @@ -17,3 +17,9 @@ Attributes specific to pprof that help convert from pprof to Profiling signal. | `pprof.mapping.has_inline_frames` | ![Development](https://img.shields.io/badge/-development-blue) | boolean | Indicates that there are inline frames related to this mapping. | | | `pprof.mapping.has_line_numbers` | ![Development](https://img.shields.io/badge/-development-blue) | boolean | Indicates that there are line numbers related to this mapping. | | | `pprof.profile.comment` | ![Development](https://img.shields.io/badge/-development-blue) | string[] | Free-form text associated with the profile. This field should not be used to store any machine-readable information, it is only for human-friendly content. | `["hello world", "bazinga"]` | +| `pprof.profile.default_sample_type` | ![Development](https://img.shields.io/badge/-development-blue) | string | Type of the preferred sample value. | `cpu` | +| `pprof.profile.doc_url` | ![Development](https://img.shields.io/badge/-development-blue) | string | Documentation link for this profile type. [1] | `http://pprof.example.com/cpu-profile.html` | +| `pprof.profile.drop_frames` | ![Development](https://img.shields.io/badge/-development-blue) | string | Frames with Function.function_name fully matching the regexp will be dropped from the samples, along with their successors. | `/foobar/` | +| `pprof.profile.keep_frames` | ![Development](https://img.shields.io/badge/-development-blue) | string | Frames with Function.function_name fully matching the regexp will be kept, even if it matches drop_frames. | `/bazinga/` | + +**[1] `pprof.profile.doc_url`:** The URL must be absolute and may be missing if the profile was generated by code that did not supply a link diff --git a/model/pprof/common.yaml b/model/pprof/common.yaml index 573c288f16..5cde1ba673 100644 --- a/model/pprof/common.yaml +++ b/model/pprof/common.yaml @@ -17,3 +17,11 @@ groups: requirement_level: recommended - ref: pprof.profile.comment requirement_level: recommended + - ref: pprof.profile.drop_frames + requirement_level: recommended + - ref: pprof.profile.keep_frames + requirement_level: recommended + - ref: pprof.profile.doc_url + requirement_level: recommended + - ref: pprof.profile.default_sample_type + requirement_level: recommended diff --git a/model/pprof/registry.yaml b/model/pprof/registry.yaml index 3410ed7b54..f5c970ca91 100644 --- a/model/pprof/registry.yaml +++ b/model/pprof/registry.yaml @@ -44,3 +44,36 @@ groups: examples: - ["hello world", "bazinga"] stability: development + - id: pprof.profile.drop_frames + brief: > + Frames with Function.function_name fully matching the regexp will be + dropped from the samples, along with their successors. + type: string + examples: + - "/foobar/" + stability: development + - id: pprof.profile.keep_frames + brief: > + Frames with Function.function_name fully matching the regexp will be + kept, even if it matches drop_frames. + type: string + examples: + - "/bazinga/" + stability: development + - id: pprof.profile.doc_url + brief: > + Documentation link for this profile type. + type: string + note: > + The URL must be absolute and may be missing if the profile was + generated by code that did not supply a link + examples: + - "http://pprof.example.com/cpu-profile.html" + stability: development + - id: pprof.profile.default_sample_type + brief: > + Type of the preferred sample value. + type: string + examples: + - "cpu" + stability: development