Skip to content

Remove lookup table access from profiles in ottl #40227

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

Merged
merged 4 commits into from
May 27, 2025

Conversation

dmathieu
Copy link
Member

Description

Access to these lookup tables isn't really useful, as they only provide a slice of values, and we can't check which one is being used by the current profile.
Also, with open-telemetry/opentelemetry-collector#13075, the lookup tables are moving out of the profile and into a new dictionary object.

So as a first step to the proto migration, this removes access to the lookup tables for a profile.
The replacement for this is #39681, which will give acces to the profile attributes, as we do with other signals and abstract away the lookup tables.

@dmathieu dmathieu marked this pull request as ready for review May 22, 2025 13:53
@dmathieu dmathieu requested a review from a team as a code owner May 22, 2025 13:53
Copy link
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.
Not having to deal with tables and indices makes using of accessors less error-prone and reduces overall maintenance.

case "location_indices":
return accessLocationIndices[K](), nil
case "function_table":
return accessFunctionTable[K](), nil
case "attribute_table":
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also remove the attribute_indices? Not sure if those indices would be useful without this removed table. Same question applies to other *indices that the lookup table is being removed: location_indices, comment_string_indices, default_sample_type_string_index (seems to use the string_table).

If the plan is to abstract the internal format, I guess we wouldn't want them to be set manually, and some mechanism similar to the attributes would be provided. Is that correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

The plan is to make the pdata upgrade possible.

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 agree removing the _indices fields makes sense as well, and I'm happy to do it. But I'd rather do that in another PR in order to avoid stalling #40285

@atoulme atoulme merged commit 4cb6bbb into open-telemetry:main May 27, 2025
191 of 192 checks passed
@github-actions github-actions bot added this to the next release milestone May 27, 2025
@dmathieu dmathieu deleted the ottl-remove-profile-tables branch May 28, 2025 07:08
mx-psi pushed a commit that referenced this pull request Jun 2, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

This PR goes in sync with
open-telemetry/opentelemetry-collector#13075,
and upgrades pdata to 1.7.0.

This is currently based after
#40227.
It can either come together or separately from that other PR.

This has been tested locally. CI can't pass now because it relies on the
changes in the core PR, which haven't been merged yet.
dd-jasminesun pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Jun 23, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Access to these lookup tables isn't really useful, as they only provide
a slice of values, and we can't check which one is being used by the
current profile.
Also, with
open-telemetry/opentelemetry-collector#13075,
the lookup tables are moving out of the profile and into a new
dictionary object.

So as a first step to the proto migration, this removes access to the
lookup tables for a profile.
The replacement for this is
open-telemetry#39681,
which will give acces to the profile attributes, as we do with other
signals and abstract away the lookup tables.

---------

Co-authored-by: Edmo Vamerlatti Costa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants