Comments (3)
Bumping up this issue and add more information.
I propose to add following keywords:
1. includes
This one will make the whole namespace re-usable and adds it to the current group on the same level - without adding a prefix to the group. It should allow to add multiple namespaces
Example: in the current schema we do have browser.yaml
inside models
groups:
- id: browser
prefix: browser
type: resource
brief: >
The web browser in which the application represented by the resource is running.
The `browser.*` attributes MUST be used only for resources that represent applications
running in a web browser (regardless of whether running on a mobile or desktop device).
attributes:
- ref: browser.brands
- ref: browser.platform
- ref: browser.mobile
- ref: browser.language
- ref: user_agent.original
using new keyword it will be written as following:
groups:
- id: browser
prefix: browser
type: resource
includes: [browser] <--- NEW keyword
brief: >
The web browser in which the application represented by the resource is running.
The `browser.*` attributes MUST be used only for resources that represent applications
running in a web browser (regardless of whether running on a mobile or desktop device).
attributes:
- ref: user_agent.original
where in md file we could either unpack namespace into specific fields or just give a link to the registry for the whole namespace:
| [`browser.*`](../attributes-registry/browser.md) | Namespace | Browser namespace | | Opt-In | <---- includes
2. embeds
This one will make the whole namespace re-usable and adds it to the current group UNDER the group using its prefix. It should allow to add multiple namespaces
Example: we would like to add whole geo.*
namespace to the client
and server
to make it possible to attach additional attributes to the both client and server.
groups:
- id: client
prefix: client
type: attribute_group
brief: >
These attributes may be used to describe the client in a connection-based network interaction
.......
attributes:
- id: address
stability: stable
type: string
using new keyword it will be written as following:
groups:
- id: client
prefix: client
type: attribute_group
embeds: [geo] <---- **NEW**
brief: >
These attributes may be used to describe the client in a connection-based network...
attributes:
- id: address
- .....
which resolves into following construction in the md file:
| [`client.geo.*`](../attributes-registry/geo.md) | Namespace | Geo namespace | | Opt-In | <---- embeds
3. embed
This one will make possible to re-use only specific attributes of the namespace, similar to the ref
but with a prefix
Example: we don't want to add the whole namespace to the client but only a few attributes.
groups:
- id: client
prefix: client
type: attribute_group
brief: >
These attributes may be used to describe the client in a connection-based network...
attributes:
- ref: client.geo.location.lon
- ...
- embed: geo.location.lat
which resolves into following construction in the md file:
| [`geo.location.lon`](../attributes-registry/geo.md) | type | Description | | Opt-In | <---- ref
| [`client.geo.location.lat`](../attributes-registry/geo.md) | type | Description | | Opt-In | <---- embed
To summarise we would have following representation of all different types (I have changed real browser example to artificial one for similarity with others):
| [`geo.*`](../attributes-registry/geo.md) | Namespace | Geo namespace | | Opt-In | <---- includes whole namespace
| [`client.geo.*`](../attributes-registry/geo.md) | Namespace | Geo namespace | | Opt-In | <---- embeds whole namespace under client
| [`geo.location.lon`](../attributes-registry/geo.md) | type | Description | | Opt-In | <---- referenced attribute
| [`client.geo.location.lat`](../attributes-registry/geo.md) | type | Description | | Opt-In | <---- embedded attribute under client
Please let me know what do you think about this idea, I would like to start to work on it soon.
from build-tools.
@open-telemetry/specs-semconv-approvers @open-telemetry/specs-semconv-maintainers would love your thoughts on the above!
from build-tools.
Most probably embed_namespaces
is more handy because it would save us time from having to embed
all of the attributes one by one. However I would like to have support for both so as to have the flexibility to embed
only specific attributes if needed.
I cannot think of any particular pitfall here (maybe others can spot sth) but in general I like this proposal +1.
from build-tools.
Related Issues (20)
- Consider using proper type annotations
- Need a soonish fix for current usage of code generation HOT 9
- Add the semconvgen Library to PyPi (semantic-conventions package) HOT 3
- Add `stability` property to semconv.schema.json HOT 2
- Render requirement level column on metrics
- update python docker image to 3.10 or greater HOT 3
- Add metric requirement level to yaml HOT 1
- Add checks that attributes are added into the registry HOT 1
- Yamlify histogram boundaries
- Add stability/deprecation to events (log_events) HOT 1
- Reconsider using constraints HOT 2
- Remove `allow_custom_values` flag on enums or change the default value to true HOT 3
- Host stability badges within otel ecosystem HOT 5
- Allow to remove note from inherited attribute HOT 1
- Review unused/low-used yaml features
- Tags should be inherited when extending semconvs
- Render note on referenced attributes by default HOT 1
- Events should support requirement level
- Semconv schema: don't require attributes on metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from build-tools.