Attribute groups in schema v2#933
Conversation
There was a problem hiding this comment.
clippy found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
752c9f1 to
2db3a6e
Compare
2db3a6e to
29bd639
Compare
crates/weaver_resolver/data/registry-test-v2-2-multifile/expected-registry.json
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #933 +/- ##
=======================================
+ Coverage 78.0% 78.3% +0.3%
=======================================
Files 76 77 +1
Lines 6021 6121 +100
=======================================
+ Hits 4699 4796 +97
- Misses 1322 1325 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
thompson-tomo
left a comment
There was a problem hiding this comment.
I also might have missed it but are we emitting public attribute groups as a part of the resolved schema and can they be distinguished from internal?
|
|
||
| A public attribute group definition consists of the following properties: | ||
|
|
||
| - `id` - Required. Uniquely identifies the attribute group. |
There was a problem hiding this comment.
Should we not call this key and then generate an id for the group?
This key should also be included in the resolved schema as a property of the attribute on a signal when it is a public group otherwise empty. This is to help with documentation.
There was a problem hiding this comment.
I don't understand the proposal. This is a group id, key is used for attributes themselves, id matches today's structure and would be more intuitive than key.
Public group ids would eventually be available on via lineage in the resolved schema after we figure out how lineage should work in v2 (#933 (comment))
There was a problem hiding this comment.
I see it as the same as attributes as you define a key which you then use to reference it from within an attributes array. Whereas an id should be unique across signals which is why id is usually prefixed with the signal type.
If it is more intuitive then it should be the same for attributes given they aim for the same thing which is adding 1 or more attributes to a signal.
I agree lineage could be made to work but it currently doesn't work. we would need to ensure that it can be distinguished from simply coming from the registry. This is so we can link from a span to the public group definition which can provide additional details about sourcing the values for instance.
There was a problem hiding this comment.
I don't agree that attributes are the same as attribute groups. Also I don't see how renaming id to key makes anything better.
There was a problem hiding this comment.
For me It is all about how it would be used.
Let's think about some of the use cases where an identifying label for a group could/would be used:
- rendering a title of the group in docs. Currently string manipulation is done
- Rendered in attribute tables on signals so link to group can be implemented.
- Added on signal definitions to add the attributes
- Code generating methods to add the groups to signals
Hence considering the above and that id's are implicitly used for internal linking, we should either add a name alongside the id with both being user defined or internally generate the id based on the key and type.
yes, please take a look at the syntax doc. |
Isn't the syntax document describing what a user writes (un-resolved), whereas the resolved is what is emitted by Weaver? In effect shouldn't we have the visibility field included in https://github.com/open-telemetry/weaver/blob/561ff28a4e3e81f9175457cda7bf63199b59fd5b/crates/weaver_resolved_schema/src/registry.rs Also doesn't your comment in #933 (comment) confirm that groups are no longer present? |
this PR does not implement resolved schema v2 - it does not exist yet, @jsuereth is working on it. After this PR v2 internal groups are do not appear in the resolve schema. public groups do. All v1 groups appear. It's still an intermediate state |
Implements #824 (comment)
TODO:
Semconv PR to update http and DB: open-telemetry/semantic-conventions@main...lmolkova:semantic-conventions:schema-v2-http-db
Example