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

Introduce specification for OTel Profiles #4197

Merged
merged 19 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ release.

### Resource

### Profiles

- Define required attributes for Mappings.
([#4197](https://github.com/open-telemetry/opentelemetry-specification/pull/4197))

### OpenTelemetry Protocol

### Compatibility
Expand Down
1 change: 1 addition & 0 deletions specification/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ path_base_for_github_subdir:
- [Protocol](protocol/README.md)
- [Metrics](metrics/data-model.md)
- [Logs](logs/data-model.md)
- [Profiles](profiles/mappings.md)
- Compatibility
- [OpenCensus](compatibility/opencensus.md)
- [OpenTracing](compatibility/opentracing.md)
Expand Down
7 changes: 7 additions & 0 deletions specification/profiles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--- Hugo front matter used to generate the website version of this page:
path_base_for_github_subdir:
from: tmp/otel/specification/profiles/_index.md
to: profiles/README.md
--->

# Profiles
32 changes: 32 additions & 0 deletions specification/profiles/mappings.md
florianl marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Mappings

**Status**: [Development](../document-status.md), except where otherwise specified
florianl marked this conversation as resolved.
Show resolved Hide resolved

This document defines the required attributes of [`Mapping`](https://github.com/open-telemetry/oteps/blob/main/text/profiles/0239-profiles-data-model.md#message-mapping) messages.

<!-- toc -->

- [Attributes](#attributes)
* [Algorithm for `process.executable.build_id.profiling`](#algorithm-for-processexecutablebuild_idprofiling)

<!-- tocstop -->

## Attributes

A message representing a `Mapping` MUST have at least one of the following
attributes:

- `process.executable.build_id.gnu`
- `process.executable.build_id.go`
florianl marked this conversation as resolved.
Show resolved Hide resolved
- `process.executable.build_id.profiling`
florianl marked this conversation as resolved.
Show resolved Hide resolved

If possible all the above listed attributes SHOULD be present in a `Mapping`. To promote interoperability, it is RECOMMENDED for `process.executable.build_id.profiling` to be present in every `Mapping`.

### Algorithm for `process.executable.build_id.profiling`

In some environments GNU and/or Go build_id values are stripped or not usable - for example Alpine
Linux which is often used as a base for Docker environments. For that reason and to promote interoperability, a deterministic build_id generation algorithm that hashes the first and last page of a file together with its length is defined as:

TRUNC(SHA256(first4k, last4k, fileLen))
florianl marked this conversation as resolved.
Show resolved Hide resolved
florianl marked this conversation as resolved.
Show resolved Hide resolved

where `TRUNC` returns the first 16bytes of the resulting digest, input to `SHA256` is passed left to right, `first4k`, `last4k` are the first and last 4096 bytes of the file (may overlap) and `fileLen` is the 8byte big-endian serialization of the file length.
florianl marked this conversation as resolved.
Show resolved Hide resolved
florianl marked this conversation as resolved.
Show resolved Hide resolved
Loading