Skip to content
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

profiling spec - definition of common string values #555

Open
jhalliday opened this issue May 3, 2024 · 3 comments
Open

profiling spec - definition of common string values #555

jhalliday opened this issue May 3, 2024 · 3 comments

Comments

@jhalliday
Copy link
Contributor

The profiles.proto and pprofextended.proto formats use string values in various places, including 'location' (e.g. kernel, native, python, hotspot, php, ...), ValueType.unit (e.g. ["cpu","nanoseconds"], ["allocations","count"]", AttributeUnit.key and original_payload_format.

To ensure consistency and assist SDK developers in providing user-friendly interfaces, some definition of commonly used values for these would be beneficial. For example, original_payload_format could specify a http content-type like convention, 'major/minor' as in 'text/html', plus some values likely to be used for common formats, e.g. "javaflightrecorder/2.0".

For fields inherited from the pprof format, defined string values should where applicable be consistent with existing usage conventions. These may be 'well known' within the golang community, but not necessarily to users of other languages.

This issue can be used as a gathering place for suggestions of possible values, pending creation of a formal profiling semantic conventions effort that may subsume them.

@jhalliday
Copy link
Contributor Author

jhalliday commented May 3, 2024

proposal for original_payload_format field:

The string SHOULD use the format "major/minor", with major being a company, open source project or other owning organization and minor being a version number or other differentiating value within that scope.

The value "javaflightrecorder/2.0" SHOULD be used to represent OpenJDK Java Flight Recorder files (.jfr) of file format version 2.0. Note for the avoidance of doubt that this is the file format version as reported in 'jfr summary ', NOT the jfr tool version as reported by 'jfr version'. By extension, future revisions of the format SHOULD be expected to follow the same pattern, e.g. "javaflightrecorder/2.1".

@tigrannajaryan
Copy link
Member

These may be 'well known' within the golang community, but not necessarily to users of other languages.

Are these 'well known` values officially written down anywhere in golang repo? If yes we could link to existing definitions.

... pending creation of a formal profiling semantic conventions effort that may subsume them.

Yes, if you plan adding a number of new conventions then https://github.com/open-telemetry/semantic-conventions is likely the best place for it.

@florianl
Copy link
Contributor

florianl commented Sep 2, 2024

With open-telemetry/semantic-conventions#1188 a semantic convention is proposed to unify common string values for the type of frames/message Location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants