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

Semantic Conventions - Multi-Registry Proposal #348

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
118e5f3
feat(multi-registry): Create first draft of the spec.
lquerel Aug 29, 2024
dba1a2c
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 29, 2024
6d08430
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 29, 2024
f075e43
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 29, 2024
7aa9129
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 29, 2024
e2bd4e0
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 30, 2024
97ed998
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 30, 2024
2050cc7
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 30, 2024
17f5b68
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 30, 2024
5cef1e2
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 30, 2024
e20011d
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 31, 2024
e963180
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 31, 2024
02e58eb
feat(multi-registry): Update draft of multi-registry spec.
lquerel Aug 31, 2024
2f04a35
Merge branch 'main' into multi-registry-spec
lquerel Aug 31, 2024
0a698de
Update multi_registry.md
lquerel Aug 31, 2024
fe45217
feat(multi-registry): Update draft of multi-registry spec.
lquerel Sep 3, 2024
d510fe3
Merge remote-tracking branch 'origin/multi-registry-spec' into multi-…
lquerel Sep 3, 2024
5562cef
feat(multi-registry): Update draft of multi-registry spec.
lquerel Sep 3, 2024
706f7dc
feat(multi-registry): Update draft of multi-registry spec.
lquerel Sep 7, 2024
b518c17
Merge branch 'main' into multi-registry-spec
lquerel Sep 7, 2024
422022f
feat(multi-registry): Update draft of multi-registry spec.
lquerel Sep 7, 2024
d5ab29d
Merge remote-tracking branch 'origin/multi-registry-spec' into multi-…
lquerel Sep 7, 2024
165f484
Merge branch 'main' into multi-registry-spec
lquerel Sep 8, 2024
21b5a5b
Merge branch 'main' into multi-registry-spec
lquerel Sep 9, 2024
5d68d7d
feat(multi-registry): uniqueness within groups is scoped by the type …
lquerel Sep 9, 2024
acb6b7b
Merge remote-tracking branch 'origin/multi-registry-spec' into multi-…
lquerel Sep 9, 2024
3d625ad
feat(multi-registry): dependency version can be a version number or l…
lquerel Sep 9, 2024
58d4f9d
chore(spec): Explain how Weaver will help resolving conflicts
lquerel Sep 11, 2024
f78e5a2
Merge branch 'main' into multi-registry-spec
lquerel Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
501 changes: 501 additions & 0 deletions docs/specs/multi-registry/multi_registry.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
groups:
- ref: otel:http.server.request.duration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that reusing the same name across different signals is allowed and is a feature rather than a bug (e.g. dns.lookup.duration is a metric name, but if DNS lookup is reported as an event, it'd make a perfect event name, or if it's reported as attribute on something, it could be an attribute name).

So we need ref: to either reference a group id (and then give them some meaning) or reference a specific signal (ref_metric).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not something currently allowed or even supported. You’re mentioning in this comment something you’d like us to explore. Is that correct?

Copy link
Contributor

@lmolkova lmolkova Sep 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm talking about current state.

I can easily define an attribute with the same name as metric, there are no checks and nothing is going to stop me. Nothing would break if I do. And I consider it a feature, not a bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. It's now fixed. See 5d68d7d

attributes:
- ref: otel:http.request.method
requirement_level: required
- ref: otel:client.address
requirement_level: required
- ref: otel:client.port
requirement_level: required
- ref: otel:thread.id
requirement_level: required
- ref: route.name
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
groups:
- id: registry.acme_http_server
type: attribute_group
display_name: Custom attributes for ACME HTTP Server
brief: 'A set of specific attributes for ACME HTTP Server.'
attributes:
# The ACME HTTP server author does not use the standard `http.route` for an unknown reason.
# Unfortunately, we cannot avoid this. In the future, we could enhance Weaver to detect these
# types of similarities and report them as advice messages.
- id: route.name
brief: 'The name of the route.'
stability: stable
requirement_level: required
type: string
- id: rate_limiter.type
brief: 'The type of rate limiter.'
stability: stable
requirement_level: required
type:
members:
- id: sliding
value: "SLIDING"
brief: 'SLIDING policy.'
stability: stable
- id: token
value: "TOKEN"
brief: 'TOKEN policy.'
stability: stable
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
groups:
- ref: otel:trace.http.server
brief: 'Trace reported by ACME HTTP Server library.'
attributes:
# The `requirement_level` of the following attributes is promoted to `required`
# Note: These 3 attributes are already attached to `trace.http.server`
- ref: otel:http.request.method
requirement_level: required
- ref: otel:client.address
requirement_level: required
- ref: otel:client.port
requirement_level: required
# A standard OTEL attribute is attached to the `trace.http.server`
# This attribute is not part of the OTEL definition of a `trace.http.server`
- ref: otel:thread.id
requirement_level: required
# Two locally defined attributes (see the attribute registry)
- ref: route.name
- ref: rate_limiter.type
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: acme_http_server_lib
version: 1.0.0
schema_url: https://acme_server.com/schemas/1.0.0
owner:
name: ACME HTTP Server Library
contact: [email protected]
maintainers:
- name: Sarah Connor
dependencies:
- name: otel
version: 1.27.0
repository: https://opentelemetry.io/registries/
23 changes: 23 additions & 0 deletions docs/specs/multi-registry/registries/app/app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
groups:
- id: endpoint.error
type: event
name: endpoint.error
brief: "An endpoint error event."
stability: stable
attributes:
- ref: otel:user.roles
requirement_level: required
- ref: otel:client.address
requirement_level: required
- ref: otel:client.port
requirement_level: required
- ref: otel:http.request.method
requirement_level: required
- ref: otel:error.type
requirement_level: required
- ref: otel:thread.id
requirement_level: required
- ref: acme:route.name
- ref: tenant.id


Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
groups:
- id: registry.app
type: attribute_group
display_name: Enterprise Application Attributes
brief: 'A set of enterprise application attributes.'
attributes:
- id: tenant.id
brief: 'The customer tenant id.'
stability: stable
requirement_level: required
type: string
15 changes: 15 additions & 0 deletions docs/specs/multi-registry/registries/app/weaver_registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: my_app
version: 1.0.0
schema_url: https://mycompany.com/schemas/my_app/1.0.0
owner:
name: MyCompany
contact: [email protected]
maintainers:
- name: John Doe
dependencies:
- name: otel
version: 1.27.0
repository: https://opentelemetry.io/registries/
- name: acme
version: 0.7.1
repository: https://github.com/acme-http-server-lib/registries/
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
groups:
- id: registry.waf
type: attribute_group
display_name: WAF Attributes
brief: 'A set of specific WAF attributes.'
attributes:
- id: waf.signature
brief: "The WAF signature"
type: string
- id: waf.action.type
brief: "The WAF action type."
stability: stable
type:
members:
- id: alarmed
value: "ALARMED"
brief: 'ALARMED action.'
stability: stable
- id: blocked
value: "BLOCKED"
brief: 'BLOCKED action.'
stability: stable
- id: legal
value: "LEGAL"
brief: 'LEGAL action.'
stability: stable
- id: dropped
value: "DROPPED"
brief: 'DROPPED action.'
stability: stable
11 changes: 11 additions & 0 deletions docs/specs/multi-registry/registries/waf-vendor/trace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
groups:
- ref: otel:trace.http.server
attributes:
- ref: otel:http.request.method
requirement_level: required
- ref: otel:client.address
requirement_level: required
- ref: otel:client.port
requirement_level: required
- ref: waf.action.type
requirement_level: required
20 changes: 20 additions & 0 deletions docs/specs/multi-registry/registries/waf-vendor/waf_action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
groups:
- id: metric.waf.action.hit.count
type: metric
metric_name: waf.action.hit.count
brief: "The number of times the action was hit."
instrument: counter
unit: "{count}"
stability: stable
extends: registry.waf
attributes:
- ref: my_otel:http.request.method
requirement_level: required
- ref: my_otel:client.address
requirement_level: required
- ref: my_otel:client.port
requirement_level: required
- ref: waf.signature
requirement_level: required
- ref: waf.action.type
requirement_level: required
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: waf_vendor
version: 1.5.1
schema_url: https://waf_vendor.com/schemas/1.5.1
owner:
name: WAF Vendor
contact: contact@waf_vendor.com
maintainers:
- name: Neo
dependencies:
- name: otel
version: 1.27.0
repository: https://opentelemetry.io/registries/
Loading