-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Remove lookup table access from profiles in ottl #40227
Conversation
There was a problem hiding this 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": |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Co-authored-by: Edmo Vamerlatti Costa <[email protected]>
<!--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.
<!--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]>
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.