Skip to content

Commit

Permalink
Add Resource semantic conventions for telemetry library attributes (#363
Browse files Browse the repository at this point in the history
)

Some exporting protocols have built-in fields for this information
(e.g. OpenCensus), some other protocols don't (e.g. Jaeger).

Our approach so far has been that this sort of information is best to be
standardized via semantic conventions and conveyed as generic attributes.
This change adds the appropriate semantic conventions.

A companion change in https://github.com/open-telemetry/opentelemetry-proto/
will be made to remove no longer needed messages that describe the Library.

Resolves #235
  • Loading branch information
tigrannajaryan authored and SergeyKanzhelev committed Nov 25, 2019
1 parent be9c155 commit e6cd52d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions specification/data-resource-semantic-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This document defines standard attributes for resources. These attributes are ty
[OpenCensus Resource standard](https://github.com/census-instrumentation/opencensus-specs/blob/master/resource/StandardResources.md).

* [Service](#service)
* [Library](#library)
* [Compute Unit](#compute-unit)
* [Container](#container)
* [Deployment Service](#deployment-service)
Expand Down Expand Up @@ -54,6 +55,27 @@ namespace = Company
service.name = Shop.shoppingcart
```

## Library

**type:** `library`

**Description:** Telemetry library information.

| Attribute | Description | Example | Required? |
|---|---|---|---|
| library.name | The name of the telemetry library. | `opentelemetry` | No |
| library.language | The language of telemetry library and of the code instrumented with it. <br/> The following spelling SHOULD be used for language strings: "cpp", "dotnet", "erlang", "go", "java", "nodejs", "php", "python", "ruby", "webjs" | `java` | No |
| library.version | The version string of the library as defined below. | `semver:1.2.3` | No |

`library.version` is a `string`, with naming schemas hinting at the type of a version,
as follows:

- `semver:1.2.3` (a semantic version)
- `git:8ae73a` (a git sha hash)
- `0.0.4.2.20190921` (a untyped version)

The type and version value MUST be separated by a colon character `:`.

## Compute Unit

Attributes defining a compute unit (e.g. Container, Process, Lambda Function).
Expand Down

0 comments on commit e6cd52d

Please sign in to comment.