Skip to content

Commit

Permalink
[chore] Move telemetry sdk to the registry (#873)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopgrassi authored Apr 3, 2024
1 parent 7a4a7d7 commit 1d592b4
Show file tree
Hide file tree
Showing 9 changed files with 147 additions and 85 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ body:
- area:service
- area:session
- area:source
- area:telemetry
- area:thread
- area:tls
- area:url
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ body:
- area:service
- area:session
- area:source
- area:telemetry
- area:thread
- area:tls
- area:url
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ body:
- area:service
- area:session
- area:source
- area:telemetry
- area:thread
- area:tls
- area:url
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Currently, the following namespaces exist:
* [Service](service.md)
* [Session](session.md)
* [Source](source.md)
* [Telemetry](telemetry.md)
* [Thread](thread.md)
* [TLS](tls.md)
* [URL](url.md)
Expand Down
43 changes: 43 additions & 0 deletions docs/attributes-registry/telemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Telemetry SDK

## Telemetry SDK Attributes

<!-- semconv registry.telemetry(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `telemetry.sdk.language` | string | The language of the telemetry SDK. | `cpp` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `telemetry.sdk.name` | string | The name of the telemetry SDK as defined above. [1] | `opentelemetry` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `telemetry.sdk.version` | string | The version string of the telemetry SDK. | `1.2.3` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `telemetry.distro.name` | string | The name of the auto instrumentation agent or distribution, if used. [2] | `parts-unlimited-java` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `telemetry.distro.version` | string | The version string of the auto instrumentation agent or distribution, if used. | `1.2.3` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
`telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point
or another suitable identifier depending on the language.
The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
All custom identifiers SHOULD be stable across different versions of an implementation.

**[2]:** Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to
a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.

`telemetry.sdk.language` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

| Value | Description | Stability |
|---|---|---|
| `cpp` | cpp | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `dotnet` | dotnet | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `erlang` | erlang | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `go` | go | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `java` | java | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `nodejs` | nodejs | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `php` | php | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `python` | python | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `ruby` | ruby | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `rust` | rust | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `swift` | swift | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `webjs` | webjs | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
<!-- endsemconv -->
12 changes: 6 additions & 6 deletions docs/resource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ service.name = Shop.shoppingcart

**Description:** The telemetry SDK used to capture data recorded by the instrumentation libraries.

<!-- semconv telemetry -->
<!-- semconv telemetry(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| `telemetry.sdk.language` | string | The language of the telemetry SDK. | `cpp` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `telemetry.sdk.name` | string | The name of the telemetry SDK as defined above. [1] | `opentelemetry` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| `telemetry.sdk.version` | string | The version string of the telemetry SDK. | `1.2.3` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`telemetry.sdk.language`](../attributes-registry/telemetry.md) | string | The language of the telemetry SDK. | `cpp` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`telemetry.sdk.name`](../attributes-registry/telemetry.md) | string | The name of the telemetry SDK as defined above. [1] | `opentelemetry` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
| [`telemetry.sdk.version`](../attributes-registry/telemetry.md) | string | The version string of the telemetry SDK. | `1.2.3` | `Required` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |

**[1]:** The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
Expand Down Expand Up @@ -197,8 +197,8 @@ All custom identifiers SHOULD be stable across different versions of an implemen
<!-- semconv telemetry_experimental -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| `telemetry.distro.name` | string | The name of the auto instrumentation agent or distribution, if used. [1] | `parts-unlimited-java` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `telemetry.distro.version` | string | The version string of the auto instrumentation agent or distribution, if used. | `1.2.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`telemetry.distro.name`](../attributes-registry/telemetry.md) | string | The name of the auto instrumentation agent or distribution, if used. [1] | `parts-unlimited-java` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`telemetry.distro.version`](../attributes-registry/telemetry.md) | string | The version string of the auto instrumentation agent or distribution, if used. | `1.2.3` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to
a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.
Expand Down
87 changes: 87 additions & 0 deletions model/registry/telemetry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
groups:
- id: registry.telemetry
prefix: telemetry
type: attribute_group
brief: >
This document defines attributes for telemetry SDK.
attributes:
- id: sdk.name
type: string
stability: stable
requirement_level: required
brief: >
The name of the telemetry SDK as defined above.
note: |
The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
`telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point
or another suitable identifier depending on the language.
The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
All custom identifiers SHOULD be stable across different versions of an implementation.
examples: ["opentelemetry"]
- id: sdk.language
type:
allow_custom_values: true
members:
- id: cpp
value: "cpp"
stability: stable
- id: dotnet
value: "dotnet"
stability: stable
- id: erlang
value: "erlang"
stability: stable
- id: go
value: "go"
stability: stable
- id: java
value: "java"
stability: stable
- id: nodejs
value: "nodejs"
stability: stable
- id: php
value: "php"
stability: stable
- id: python
value: "python"
stability: stable
- id: ruby
value: "ruby"
stability: stable
- id: rust
value: "rust"
stability: stable
- id: swift
value: "swift"
stability: stable
- id: webjs
value: "webjs"
stability: stable
stability: stable
requirement_level: required
brief: >
The language of the telemetry SDK.
- id: sdk.version
type: string
stability: stable
requirement_level: required
brief: >
The version string of the telemetry SDK.
examples: ["1.2.3"]
- id: distro.name
type: string
stability: experimental
brief: >
The name of the auto instrumentation agent or distribution, if used.
note: |
Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to
a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.
examples: ["parts-unlimited-java"]
- id: distro.version
type: string
stability: experimental
brief: >
The version string of the auto instrumentation agent or distribution, if used.
examples: ["1.2.3"]
66 changes: 3 additions & 63 deletions model/resource/telemetry.yaml
Original file line number Diff line number Diff line change
@@ -1,72 +1,12 @@
groups:
- id: telemetry
prefix: telemetry
type: resource
brief: >
The telemetry SDK used to capture data recorded by the instrumentation libraries.
attributes:
- id: sdk.name
type: string
stability: stable
- ref: telemetry.sdk.name
requirement_level: required
brief: >
The name of the telemetry SDK as defined above.
note: |
The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to `opentelemetry`.
If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
`telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point
or another suitable identifier depending on the language.
The identifier `opentelemetry` is reserved and MUST NOT be used in this case.
All custom identifiers SHOULD be stable across different versions of an implementation.
examples: ["opentelemetry"]
- id: sdk.language
type:
allow_custom_values: true
members:
- id: cpp
value: "cpp"
stability: stable
- id: dotnet
value: "dotnet"
stability: stable
- id: erlang
value: "erlang"
stability: stable
- id: go
value: "go"
stability: stable
- id: java
value: "java"
stability: stable
- id: nodejs
value: "nodejs"
stability: stable
- id: php
value: "php"
stability: stable
- id: python
value: "python"
stability: stable
- id: ruby
value: "ruby"
stability: stable
- id: rust
value: "rust"
stability: stable
- id: swift
value: "swift"
stability: stable
- id: webjs
value: "webjs"
stability: stable
stability: stable
- ref: telemetry.sdk.language
requirement_level: required
brief: >
The language of the telemetry SDK.
- id: sdk.version
type: string
stability: stable
- ref: telemetry.sdk.version
requirement_level: required
brief: >
The version string of the telemetry SDK.
examples: ["1.2.3"]
20 changes: 4 additions & 16 deletions model/resource/telemetry_experimental.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
groups:
- id: telemetry_experimental
prefix: telemetry
type: resource
brief: >
The telemetry SDK used to capture data recorded by the instrumentation libraries.
attributes:
- id: distro.name
type: string
stability: experimental
brief: >
The name of the auto instrumentation agent or distribution, if used.
note: |
Official auto instrumentation agents and distributions SHOULD set the `telemetry.distro.name` attribute to
a string starting with `opentelemetry-`, e.g. `opentelemetry-java-instrumentation`.
examples: ["parts-unlimited-java"]
- id: distro.version
type: string
stability: experimental
brief: >
The version string of the auto instrumentation agent or distribution, if used.
examples: ["1.2.3"]
- ref: telemetry.distro.name
requirement_level: recommended
- ref: telemetry.distro.version
requirement_level: recommended

0 comments on commit 1d592b4

Please sign in to comment.