Skip to content

profiles: improve attribute encoding in ProfilesDictionary#672

Merged
tigrannajaryan merged 5 commits intoopen-telemetry:mainfrom
jhalliday:profiles-p
Aug 21, 2025
Merged

profiles: improve attribute encoding in ProfilesDictionary#672
tigrannajaryan merged 5 commits intoopen-telemetry:mainfrom
jhalliday:profiles-p

Conversation

@jhalliday
Copy link
Copy Markdown
Contributor

Subsequent to #659 (profiles: avoid 'optional' keyword usage) and in accordance with discussions in the profiling SIG, this PR updates the dictionary message docs to impose a more consistent handling of 'null pointer' semantics in the encoding pattern.

@jhalliday jhalliday requested review from a team June 13, 2025 10:03
@jhalliday
Copy link
Copy Markdown
Contributor Author

ref #659 (comment)
@open-telemetry/profiling-maintainers @jsuereth

Comment thread opentelemetry/proto/profiles/v1development/profiles.proto Outdated
Comment thread opentelemetry/proto/profiles/v1development/profiles.proto Outdated
@jhalliday
Copy link
Copy Markdown
Contributor Author

@open-telemetry/profiling-maintainers as discussed in the SIG meeting, this PR now has the KeyValueAndUnit change and is ready for another review. The indexing change has moved to #688

@jhalliday jhalliday changed the title profiles: dictionary table encoding consistency improvement. profiles: improve attribute encoding in ProfilesDictionary Jul 25, 2025
Copy link
Copy Markdown
Contributor

@rockdaboot rockdaboot left a comment

Choose a reason for hiding this comment

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

lgtm, just a few nits

Comment thread opentelemetry/proto/profiles/v1development/profiles.proto Outdated
Comment thread opentelemetry/proto/profiles/v1development/profiles.proto Outdated
Comment thread opentelemetry/proto/profiles/v1development/profiles.proto Outdated
Copy link
Copy Markdown
Member

@florianl florianl left a comment

Choose a reason for hiding this comment

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

From a Profiling protocol perspective I appreciate this change. It drops the complexity of needing to handle two tables (attribute_table and attribute_units), while at the same time it also makes benefit of the string table (using key_strindex and unit_strindex).

As the OTel ecosystem uses opentelemetry.proto.common.v1.KeyValue in various signal, we might need to adapt some parts of this ecosystem. But I think, this should not be a blocker for this great step forward!

Comment thread opentelemetry/proto/profiles/v1development/profiles.proto
Comment thread opentelemetry/proto/profiles/v1development/profiles.proto
@jhalliday
Copy link
Copy Markdown
Contributor Author

@jsuereth @tigrannajaryan I've updated it to address @open-telemetry/profiling-maintainers comments. Unless you have anything else I think this one is ready to go.

@jhalliday jhalliday requested review from aalexand and felixge August 7, 2025 15:06
Comment thread opentelemetry/proto/profiles/v1development/profiles.proto
@tigrannajaryan
Copy link
Copy Markdown
Member

Please resolve the conflicts.

@tigrannajaryan tigrannajaryan merged commit 53b4bbd into open-telemetry:main Aug 21, 2025
17 checks passed
@pellared pellared mentioned this pull request Aug 29, 2025
tigrannajaryan pushed a commit that referenced this pull request Sep 2, 2025
### Changed

- profiles: drop gzip requirement. [#661](#661)
- profiles: avoid `optional` keyword usage. [#659](#659)
- profiles: make `profile_id` optional. [#665](#665)
- profiles: use single `Profile.sample_type` and clarify use of timestamps. [#649](#649)
- all: add notes about the attribute values restrictions. [#683](https://github.com/open-telemetry/opentelemetry-proto/pull/683)<br>⚠️ **IMPORTANT**: These restrictions can be dropped in a future minor release.
- profiles: clarify usage of the zero value as the first element of tables in `ProfilesDictionary`. [#688](#688), [#698](#698)
- profiles: unsigned `time_nanos` and `duration_nanos` in `Profile`. [#692](#692)
- profiles: improve attribute encoding in `ProfilesDictionary`. [#672](#672)
- profiles: simplify profile stack trace representation. [#708](#708)

### Fixed

- examples: fix OTLP JSON Event example body. [#666](#666)
- docs: minor specification fixes around `UNAVAILABLE` and `RetryInfo`. [#669](#669)

### Removed

- profiles: remove `default_sample_type`. [#679](#679)
- profiles: remove `has_*` debug info fields, they are moving to attributes. [#595](#595)
- profiles: remove `Location.is_folded`. [#690](#690)
fandreuz added a commit to fandreuz/async-profiler that referenced this pull request Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants