Skip to content

Commit

Permalink
Add agent semantic conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrannajaryan committed Apr 17, 2024
1 parent 4728f63 commit cdbd4a9
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/attributes-registry/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Agent

## Agent Attributes

<!-- semconv registry.agent(omit_requirement_level) -->
| Attribute | Type | Description | Examples | Stability |
|---|---|---|---|---|
| `agent.distro` | string | Agent distribution. [1] | `github.com/signalfx/splunk-otel-collector`; `github.com/aws-observability/aws-otel-collector` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `agent.type` | string | Agent type. [2] | `io.opentelemetry.collector`; `com.dynatrace.one_agent`; `com.newrelic.infra_agent` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `agent.version` | string | The version string of the agent. The format is not defined by these conventions. | `2.0.0`; `a01dbef8a` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** An identifier that identifies the distribution of the agent. A number of distributions can belong to the same agent.type. For example OpenTelemetry Collector has multiple known distributions, e.g. github.com/signalfx/splunk-otel-collector, github.com/aws-observability/aws-otel-collector, etc. The value is typically a URL where the agent's source code is hosted (without the preceding http/https scheme). However other approaches for choosing agent.distro values are also valid (e.g. reverse FQDN).

**[2]:** A string that uniquely identifies the agent type. A recommended way to choose a value is to pick a reverse FQDN of a domain that is under the control of the agent's author. Must remain unchanged between different versions of the same agent type.
<!-- endsemconv -->
18 changes: 18 additions & 0 deletions docs/resource/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

# Agent

## Agent Attributes

<!-- semconv agent(full) -->
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`agent.type`](../attributes-registry/agent.md) | string | Agent type. [1] | `io.opentelemetry.collector`; `com.dynatrace.one_agent`; `com.newrelic.infra_agent` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`agent.distro`](../attributes-registry/agent.md) | string | Agent distribution. [2] | `github.com/signalfx/splunk-otel-collector`; `github.com/aws-observability/aws-otel-collector` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`agent.version`](../attributes-registry/agent.md) | string | The version string of the agent. The format is not defined by these conventions. | `2.0.0`; `a01dbef8a` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

**[1]:** A string that uniquely identifies the agent type. A recommended way to choose a value is to pick a reverse FQDN of a domain that is under the control of the agent's author. Must remain unchanged between different versions of the same agent type.

**[2]:** An identifier that identifies the distribution of the agent. A number of distributions can belong to the same agent.type. For example OpenTelemetry Collector has multiple known distributions, e.g. github.com/signalfx/splunk-otel-collector, github.com/aws-observability/aws-otel-collector, etc. The value is typically a URL where the agent's source code is hosted (without the preceding http/https scheme). However other approaches for choosing agent.distro values are also valid (e.g. reverse FQDN).
<!-- endsemconv -->
40 changes: 40 additions & 0 deletions model/registry/agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
groups:
- id: registry.agent
prefix: agent
type: attribute_group
brief: >
An agent.
attributes:
- id: type
type: string
stability: experimental
brief: >
Agent type.
examples: [io.opentelemetry.collector,com.dynatrace.one_agent,com.newrelic.infra_agent]

Check failure on line 13 in model/registry/agent.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma

Check failure on line 13 in model/registry/agent.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[commas] too few spaces after comma
note: >
A string that uniquely identifies the agent type. A recommended way to choose
a value is to pick a reverse FQDN of a domain that is under the control of the
agent's author. Must remain unchanged between different versions of the same
agent type.

Check failure on line 19 in model/registry/agent.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[trailing-spaces] trailing spaces
- id: version
type: string
stability: experimental
brief: >
The version string of the agent. The format is not defined by these conventions.
examples: ["2.0.0", "a01dbef8a"]

- id: distro
type: string
stability: experimental
brief: >
Agent distribution.
examples: [github.com/signalfx/splunk-otel-collector, github.com/aws-observability/aws-otel-collector]
note: >
An identifier that identifies the distribution of the agent. A number of
distributions can belong to the same agent.type. For example OpenTelemetry
Collector has multiple known distributions, e.g. github.com/signalfx/splunk-otel-collector,

Check failure on line 36 in model/registry/agent.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[trailing-spaces] trailing spaces
github.com/aws-observability/aws-otel-collector, etc.

Check failure on line 37 in model/registry/agent.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[trailing-spaces] trailing spaces
The value is typically a URL where the agent's source code is hosted

Check failure on line 38 in model/registry/agent.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[trailing-spaces] trailing spaces
(without the preceding http/https scheme). However other approaches for choosing
agent.distro values are also valid (e.g. reverse FQDN).
11 changes: 11 additions & 0 deletions model/resource/agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
groups:
- id: agent
prefix: agent
type: resource
brief: >
An agent
attributes:
- ref: agent.type
requirement_level: required
- ref: agent.version
- ref: agent.distro

0 comments on commit cdbd4a9

Please sign in to comment.