-
Notifications
You must be signed in to change notification settings - Fork 66
Description
Current Scenario
When we are defining semantic conventions, all attributes must be a member of an attribute group. This attribute group can either reference pre-existing attributes, create new attributes or even extend existing groups.
Example of current solution
Defining signals
span.db.clienttrace.db.common.fulltrace.db.common.query_and_collectionattributes.db.client.with_query_and_collectionattributes.db.client.with_queryattributes.db.client.minimal
Each level can add/update the attributes, hence resulting in difficult to mantain defintiions especially if you don't want an attribute provided by a lower group ie attributes.db.client.with_query which then fractures the definition resulting in many more groups
Defining log attributes
Another use case is defining a bundle of attributes which can be added to other signals ie Cloud Events which is what we currently do.
Proposed Solutions
Introduce Attribute Bundles
Attribute bundles are a way in which to group attributes together so that they can be reused.
bundle:
- name: cloudevents
brief: Adds cloud event details to logs, traces &/or events
note:
attributes
- ref: xyz
The difference to current attribute groups is the removal of the extends functionality but replacement available via new soution.
Usage of bundles
span:
- name: example.span.client
brief: Adds cloud event details to logs, traces &/or events
note:
attributes
- ref: xyz
uses:
- server
- cloudevents
conditional:
brief: Only applies when using cloud events
By specifiying the bundle as being conditional these attributes are only applicable based on the conditions. In effect this becomes a replacement for the conditionally required requirement but is out of scope of this issue.
Advantages
With this new solution we can define bundles for items such as Cloud Events, Servers and add this to the applicable signals. This way if the bundle is extended at a later point only the bundle needs to be updated and all the cases benefit.
Additional Context
Without the grouping v2 will be a regression of functionality and resulting in an increased maintaince effort due to the duplication/repeatition of atttributes.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status