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

Improve lookup table pattern use in profiles. #592

Merged
merged 6 commits into from
Nov 4, 2024

Conversation

jhalliday
Copy link
Contributor

Based on implementation experience with the draft version of the profiles spec, the use of lookup tables for storing values is space efficient but not particularly user friendly. This change makes improvements by changing field names to clarify their role in the pattern and changing their data types to better accommodate their use in languages limited to 32 bit array indexing e.g. Java.

Copy link
Member

@christos68k christos68k left a comment

Choose a reason for hiding this comment

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

Added some docstring nits for consistency

Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

I like the clarity of the renames

Copy link
Member

@felixge felixge left a comment

Choose a reason for hiding this comment

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

LGTM. Nits (that could be addressed in follow-up PRs)

  • Why int32 instead of uint32 for the indexes? I'd prefer the latter, but don't feel strongly.
  • key_strindex and link_index feels inconsistent. My preference would be key_string_index (same for other string indexes)

@tigrannajaryan
Copy link
Member

This has the required number of approvals. The rules require that we keep it open for 2 days since the last substantial change before merging. I will merge after that.

@jhalliday
Copy link
Contributor Author

uint32 has the same problem as int64 - it can hold values that don't map cleanly to the signed 32 bit array range in Java. It would express intent more clearly, but potentially cause more headaches for implementers.

@tigrannajaryan
Copy link
Member

All comments must be resolved before we can merge.

@tigrannajaryan tigrannajaryan merged commit d77c317 into open-telemetry:main Nov 4, 2024
15 checks passed
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.

7 participants