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

Fix possible collisions when attribute is renamed #72

Closed
lmolkova opened this issue May 24, 2024 · 1 comment
Closed

Fix possible collisions when attribute is renamed #72

lmolkova opened this issue May 24, 2024 · 1 comment

Comments

@lmolkova
Copy link
Contributor

See open-telemetry/semantic-conventions#1031 for the details

TL;DR:

to_const_name jinja helper generates the same constant name for foo.bar and foo_bar.
Tooling will provide a better helper, the workaround for now is to use custom macro

e.g.

{%- macro to_const_name_v2(attribute_name) -%}
{{attribute_name | replace("_", "__") | to_const_name}}
{%- endmacro %}

So that no collision would happen.

We're still collecting input on how a good format would look like

@jack-berg
Copy link
Member

Based on this comment I believe this is resolved:

How to resolve client.id vs client_id - open-telemetry/semantic-conventions#1031 (comment) - manually drop messaging.client_id.
Existing jinja and build-tools solution implements it already and here's the weaver-based approach in python
declare a list of excluded ones
exclude them in jinja or in JQ (in python we decided to generate them as comments for transparency)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants