-
Notifications
You must be signed in to change notification settings - Fork 182
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
Implement code-generation hints to drop/rename attributes in case of a collision #1462
Comments
Scenarios to consider
ProposalCombining with #1419 to keep it consistent with deprecation if possible. Scenarios 1 & 2i- id: registry.foo
...
attributes:
- id: foo.bar_id
deprecated: # not in the scope of this item
action: rename
renamed_to: foo.bar.id
code_generation_hint: # <-- this is the proposal for scenarios 1 and 2i above
action: exclude # <-- this is the proposal for scenarios 1 and 2i above Scenarios 2ii & 3- id: registry.foo
...
attributes:
- id: foo.bar_code
type: int
deprecated:
action: remove
note: Renamed to `foo.bar.code` and type changed to string
- id: foo.bar.code
type: string
code_generation_hint: # <-- this is the proposal for scenario 2ii
code_friendly_name: foo_bar_code2 # <-- this is the proposal for scenario 2ii
- id: pprof::foo.bar
code_generation_hint: # <-- this is the proposal for scenario 3
code_friendly_name: pprof_foo_bar # <-- this is the proposal for scenario 3 Alternative proposal- id: registry.foo
...
attributes:
- id: foo.bar_id
deprecated: # not in the scope of this item
action: rename
renamed_to: foo.bar.id
code_generation_hint: exclude # <-- this is the proposal for scenarios 1 and 2i above
- id: pprof::foo.bar
code_friendly_name: pprof_foo_bar # <-- this is the proposal for scenario 2ii & 3 |
The following policies will be necessary:
|
Based on the discussions on slack there is a preference for option 1: code_generation_hint:
action: exclude
code_friendly_name: <> |
#1624 is currently blocked because we are trying to rename I understand from the description of #1614 PR that this PR could provide a solution to this, but it's more about "conflicts with dots to underscores" rather than "adding suffix to an already existing semconv attribute". For #1613 the rename of |
If this change can help with namespace suffix changes, then it could also probably help unblock #1638 where creating a new attribute that reuses the namespace of an existing attribute is not possible ( |
This is a tracking issue for #1118 (comment) Phase 2
Currently we don't allow collisions between attribute/event/etc names in the code-friendly representation of them (
.
replaced with_
).But we have some attributes that would benefit from renaming (e.g.
db.cosmosdb.client_id
should stay consistent withmessaging.client.id
).We can resolve it by providing code-generation hints in the yaml that would help code-generator to resolve collisions.
The text was updated successfully, but these errors were encountered: