-
Notifications
You must be signed in to change notification settings - Fork 291
pprof: add profile attribute #3078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add pprof specific attributes to help convert pprof to OTel profiles and vice versa. Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
ffbafc0 to
27ddb08
Compare
| examples: | ||
| - "/foobar/" | ||
| stability: development | ||
| - id: pprof.profile.keep_frames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| examples: | ||
| - ["hello world", "bazinga"] | ||
| stability: development | ||
| - id: pprof.profile.drop_frames |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| examples: | ||
| - "/bazinga/" | ||
| stability: development | ||
| - id: pprof.profile.doc_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| examples: | ||
| - "http://pprof.example.com/cpu-profile.html" | ||
| stability: development | ||
| - id: pprof.profile.default_sample_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Should these new attributes also appear on the profiles page in the compatibility section? |
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
| | [`pprof.mapping.has_inline_frames`](/docs/registry/attributes/pprof.md) |  | `Recommended` | boolean | Indicates that there are inline frames related to this mapping. | | | ||
| | [`pprof.mapping.has_line_numbers`](/docs/registry/attributes/pprof.md) |  | `Recommended` | boolean | Indicates that there are line numbers related to this mapping. | | | ||
| | [`pprof.profile.comment`](/docs/registry/attributes/pprof.md) |  | `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) |  | `Recommended` | string | Type of the preferred sample value. | `cpu` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What attributes map will carry this attribute? Instrumentation scope?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResourceProfiles.resource.attributes might be the best location to set this attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A single resource contains "repeated ScopeProfiles scope_profiles" and each of those has "repeated Profile profiles". The default could be in theory different for different scopes I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, should the second part in the attribute name reflect where the attribute is set? That is:
pprof.resource.*forresource_profiles[].resource.attributes[]pprof.scope.*forresource_profiles[].scope_profiles[].scope.attributes[]pprof.profile.*forresource_profiles[].scope_profiles[].profiles[].attribute_indices[]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applying these attributes at the instrumentation scope level makes sense to me 👍
| | [`pprof.mapping.has_inline_frames`](/docs/registry/attributes/pprof.md) |  | `Recommended` | boolean | Indicates that there are inline frames related to this mapping. | | | ||
| | [`pprof.mapping.has_line_numbers`](/docs/registry/attributes/pprof.md) |  | `Recommended` | boolean | Indicates that there are line numbers related to this mapping. | | | ||
| | [`pprof.profile.comment`](/docs/registry/attributes/pprof.md) |  | `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) |  | `Recommended` | string | Type of the preferred sample value. | `cpu` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a sample_type_order field as initially suggested in this comment, further clarified in this one as well as @aalexand's document.
AFAIR we had consensus on this already.
Changes
Add pprof specific attributes to help convert pprof to OTel profiles and vice versa.
FYI @open-telemetry/profiling-approvers
Important
Pull requests acceptance are subject to the triage process as described in Issue and PR Triage Management.
PRs that do not follow the guidance above, may be automatically rejected and closed.
Merge requirement checklist
[chore]