Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ release.

### Profiles

- Remove duplicate information from and extend Profiles documentation (README.md, pprof.md).
([#4932](https://github.com/open-telemetry/opentelemetry-specification/pull/4932))

### Resource

### Entities
Expand Down
101 changes: 74 additions & 27 deletions specification/profiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,81 @@ path_base_for_github_subdir:

# OpenTelemetry Profiles

**Status**: [Development](/docs/specs/otel/document-status/)

> [!NOTE]
>
> The profiles signal is still experimental and under active development.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should rephrase this note to sound less concerning.

Suggested change
> The profiles signal is still experimental and under active development.
> The profiles signal is currently marked as Alpha under development.

Copy link
Member Author

@christos68k christos68k Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same preamble as the one I added in Profiles concepts (which already went live). Since the signal isn't yet Alpha, I think this is more accurate.

We can update this to Alpha shortly before or immediately after the announcement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. It's not yet marked as alpha (see this PR).

But maybe we don't need this whole paragraph since the Status is already declared above. Other documents with status "Development" don't seem to have such a Notes section either.

Anyway, since it's already in the other doc, I'm also fine with keeping it for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably gather ourselves a list of all places that need to be coherently updated on the Alpha day.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> Breaking changes may be introduced in future versions.

<details>
<summary>Table of Contents</summary>

<!-- toc -->

- [Overview](#overview)
- [Design goals](#design-goals)
- [Data Model](#data-model)
- [Known values](#known-values)
- [Specifications](#specifications)
- [References](#references)

<!-- tocstop -->

</details>

## Overview

Profiles are emerging as the fourth essential signal of observability, alongside
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I previously moved this overview to the Profiles concepts page.

logs, metrics, and traces. They offer unparalleled insights into system and
application behavior, often uncovering performance bottlenecks overlooked by
other signals.

Profiles provide granular, time-based views of resource consumption and
code execution, encompassing:

* **Application-level profiling**: Reveals how software functions consume CPU,
memory, and other resources, highlighting slow or inefficient code.

* **System-level profiling**: Offers a holistic view of the infrastructure,
pinpointing issues in operating system calls, kernel operations, and I/O.

This performance picture can lead to:

* **Faster Root Cause Analysis**: Quickly identifies the exact cause of
performance degradation.
* **Proactive Optimization**: Identifies potential issues before user impact.
* **Improved Resource Utilization**: Optimizes infrastructure for cost savings
and efficiency.
* **Enhanced Developer Productivity**: Helps developers validate code performance
and prevent regressions.

In essence, while logs, metrics, and traces show "what" and "how much/where"
profiles explain "why" and "how efficiently" making them indispensable in modern
observability.
A **profile** is a collection of stack traces with associated values
representing resource consumption, collected from a running program. Profiling
is the process of collecting such profiles, typically by sampling program state
at regular intervals.

For a general introduction to OpenTelemetry profiling and how it complements other
observability signals, see [Profiles concepts](/docs/concepts/signals/profiles).

## Design goals

The profiles signal is designed with the following goals in mind:

- **Low overhead**: Enable profiling agents to operate continuously in production
environments without materially impacting application performance.
- **Efficient representation**: Reduces volume of data stored and transmitted,
by using dictionary tables to deduplicate repeated information across samples.
- **Compatibility with existing formats**: The data model is a superset of
established profiling formats such as [pprof](https://github.com/google/pprof)
and in most cases supports lossless conversions to and from these formats.
If that's not possible (e.g. custom extensions), the `original_payload_format`
field can be used to transmit the original information for future lossless
export or reinterpretation.
- **Correlation with other signals**: Profiles MUST be linkable to logs, metrics
and traces through shared resource context and, where applicable,
direct trace/span references. This is the primary differentiator of OpenTelemetry
profiles compared to standalone profiling solutions.

## Data model

The OpenTelemetry profiles data model is defined [here](./data-model.md).
It builds on the [pprof protobuf format](https://github.com/google/pprof/tree/main/proto)
and extends it with:

- **Resource and scope context**: Each batch of profiles is associated with a
[Resource](/docs/specs/otel/resource/) and an
[InstrumentationScope](/docs/specs/otel/common/instrumentation-scope/),
consistent with logs, metrics and traces.
- **Generalized dictionary**: Deduplicates not only strings but also other messages
that exhibit redundancy.
- **Generalized attributes**: Most messages can carry attributes following the
same conventions as other signals, augmented with Unit information (`KeyValueAndUnit`).
Comment on lines +71 to +72
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the topic around KeyValueAndUnit is under discussion and there will be some change, we should not point it out here. To me, its an implementation detail rather than a key concept in the data model.
Also, I think it does not add more to the data model that is not yet covered by **Generalized dictionary**.

Suggested change
- **Generalized attributes**: Most messages can carry attributes following the
same conventions as other signals, augmented with Unit information (`KeyValueAndUnit`).

Copy link
Member Author

@christos68k christos68k Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we absolutely need to mention this here for two main reasons:

  1. This is a major differentiator from pprof
  2. It doesn't follow existing OTel conventions so questions may arise

I think one job of the spec is to clarify such corner cases instead of hiding them. Moreover, this is not just an implementation detail but a core aspect of the data model, which I'll also try to explain in data-model.md.

- **Span context references**: Samples MAY include a `Link` (span ID and trace ID),
enabling direct linking between a profile sample and the trace/span during
which it was captured.

For details on the required attributes for `Mapping` messages and the custom
hashing scheme for build id generation, see [Mappings](./mappings.md).

For more information on compatibility with [pprof](https://github.com/google/pprof),
see [pprof](./pprof.md).

## Known values

Expand All @@ -61,3 +95,16 @@ tools, known values are utilized.
| Profile field | Known values |
| ------------- | ------------ |
| original_payload_format | [pprof](https://github.com/google/pprof/tree/main/proto), [jfr](https://en.wikipedia.org/wiki/JDK_Flight_Recorder) or [linux_perf](https://perfwiki.github.io/) |

## Specifications

* [Profiles Data Model](./data-model.md)
* [Profiles Mappings Attributes](./mappings.md)
* [Profiles Pprof Compatibility](./pprof.md)

## References

- [Profiles Concepts](/docs/concepts/signals/profiles)
- [Profiles Semantic Conventions](/docs/specs/semconv/general/profiles)
- [OTEP0212 OpenTelemetry Profiles Vision](../../oteps/profiles/0212-profiling-vision.md)
- [OTEP0239 OpenTelemetry Profiles Data Model](../../oteps/profiles/0239-profiles-data-model.md)
13 changes: 7 additions & 6 deletions specification/profiles/pprof.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@

## Compatibility

Original [pprof](https://github.com/google/pprof/tree/main/proto) is forward
compatible with OpenTelemetry Profiles in a sense that it can be transformed into
OpenTelemetry Profiles and again into [pprof](https://github.com/google/pprof/tree/main/proto)
without data loss.
Original [pprof](https://github.com/google/pprof/tree/main/proto) is compatible
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we merge this pprof.md file into the README.md, as a section? It's not a lot of text, so it might be easier to just have the single README.md file.

Copy link
Member Author

@christos68k christos68k Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we want really good integration with pprof due to its importance, I was thinking we'd want to expand the pprof information at some point, once we have a better/clearer story to tell there regarding conversions, recommendations, maybe an example and so on.

In that way it's similar to mappings.md, but I have no strong opinion on this for now (maybe if we leave it as a separate page it'll act as a nudge for us to improve it). If you feel strongly that we should merge it into the README, LMK and I will update.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point about expanding this at some point and the separate file being a nudge. SG to keep it separate.

with OpenTelemetry Profiles in that it can be transformed into OpenTelemetry Profiles
and back again into [pprof](https://github.com/google/pprof/tree/main/proto) without
data loss (convertibility but not wire compatibility).

To enable this compatibility through explicit conversion, OpenTelemetry provides a `pprof` [namespace](https://opentelemetry.io/docs/specs/semconv/general/profiles/#compatibility-with-pprof)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the link to the pprof namespace and not the copy of some of this namespace in the Profiles space.

Suggested change
To enable this compatibility through explicit conversion, OpenTelemetry provides a `pprof` [namespace](https://opentelemetry.io/docs/specs/semconv/general/profiles/#compatibility-with-pprof)
To enable this compatibility through explicit conversion, OpenTelemetry provides a `pprof` [namespace](https://opentelemetry.io/docs/specs/semconv/registry/attributes/pprof/)

Copy link
Member Author

@christos68k christos68k Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update the wording here to remove the reference to 'namespace' and keep the existing link as I think it's more helpful (it contains additional explanatory text that gives more context and helps frame the attributes that follow).

EDIT: See 6b4382e

in [Semantic Conventions](https://opentelemetry.io/docs/specs/semconv).

For this compatibility OpenTelemetry also provides a `pprof` namespace in
Semantic Conventions.
Loading