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

Mark service and telemetry.sdk resource attributes as stable. #3202

Merged
merged 17 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion semantic_conventions/resource/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ groups:
it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID
(services aiming for reproducible UUIDs may also use Version 5, see RFC 4122
for more recommendations).
examples: ["627cc493-f310-47de-96bd-71410b7dec09"]
examples: ["my-k8s-pod-deployment-1", "627cc493-f310-47de-96bd-71410b7dec09"]
- id: version
type: string
brief: >
Expand Down
23 changes: 21 additions & 2 deletions specification/resource/semantic_conventions/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Resource Semantic Conventions

**Status**: [Experimental](../../document-status.md)
**Status**: [Mixed](../../document-status.md)

This document defines standard attributes for resources. These attributes are typically used in the [Resource](../sdk.md) and are also recommended to be used anywhere else where there is a need to describe a resource in a consistent manner. The majority of these attributes are inherited from
[OpenCensus Resource standard](https://github.com/census-instrumentation/opencensus-specs/blob/master/resource/StandardResources.md).
Expand Down Expand Up @@ -34,12 +34,16 @@ This document defines standard attributes for resources. These attributes are ty

## Document Conventions

**Status**: [Stable](../../document-status.md)

Attributes are grouped logically by the type of the concept that they described. Attributes in the same group have a common prefix that ends with a dot. For example all attributes that describe Kubernetes properties start with "k8s."

Certain attribute groups in this document have a **Required** column. For these groups if any attribute from the particular group is present in the Resource then all attributes that are marked as Required MUST be also present in the Resource. However it is also valid if the entire attribute group is omitted (i.e. none of the attributes from the particular group are present even though some of them are marked as Required in this document).
jsuereth marked this conversation as resolved.
Show resolved Hide resolved

## Attributes with Special Handling

**Status**: [Stable](../../document-status.md)

Given their significance some resource attributes are treated specifically as described below.

### Semantic Attributes with Dedicated Environment Variable
Expand All @@ -55,9 +59,12 @@ These are the attributes which MUST be provided by the SDK
as specified in the [Resource SDK specification](../sdk.md#sdk-provided-resource-attributes):

- [`service.name`](#service)
- [`telemetry.sdk` group](#telemetry-sdk)
jsuereth marked this conversation as resolved.
Show resolved Hide resolved

## Service

**Status**: [Stable](../../document-status.md)

**type:** `service`

**Description:** A service instance.
Expand All @@ -67,7 +74,7 @@ as specified in the [Resource SDK specification](../sdk.md#sdk-provided-resource
|---|---|---|---|---|
| `service.name` | string | Logical name of the service. [1] | `shoppingcart` | Required |
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
| `service.namespace` | string | A namespace for `service.name`. [2] | `Shop` | Recommended |
| `service.instance.id` | string | The string ID of the service instance. [3] | `627cc493-f310-47de-96bd-71410b7dec09` | Recommended |
| `service.instance.id` | string | The string ID of the service instance. [3] | `my-k8s-pod-deployment-1`; `627cc493-f310-47de-96bd-71410b7dec09` | Recommended |
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
| `service.version` | string | The version string of the service API or implementation. | `2.0.0` | Recommended |

**[1]:** MUST be the same for all instances of horizontally scaled services. If the value was not specified, SDKs MUST fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md#process), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value MUST be set to `unknown_service`.
Expand All @@ -93,6 +100,8 @@ service.name = Shop.shoppingcart

## Telemetry SDK

**Status**: [Stable](../../document-status.md)
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
jsuereth marked this conversation as resolved.
Show resolved Hide resolved

**type:** `telemetry.sdk`

**Description:** The telemetry SDK used to capture data recorded by the instrumentation libraries.
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -133,6 +142,8 @@ The identifier SHOULD be stable across different versions of an implementation.

## Compute Unit

**Status**: [Experimental](../../document-status.md)

Attributes defining a compute unit (e.g. Container, Process, Function as a Service):

- [Container](./container.md)
Expand All @@ -142,12 +153,16 @@ Attributes defining a compute unit (e.g. Container, Process, Function as a Servi

## Compute Instance

**Status**: [Experimental](../../document-status.md)

Attributes defining a computing instance (e.g. host):

- [Host](./host.md)

## Environment

**Status**: [Experimental](../../document-status.md)

Attributes defining a running environment (e.g. Operating System, Cloud, Data Center, Deployment Service):

- [Operating System](./os.md)
Expand All @@ -160,12 +175,16 @@ Attributes defining a running environment (e.g. Operating System, Cloud, Data Ce

## Version attributes
jsuereth marked this conversation as resolved.
Show resolved Hide resolved

**Status**: [Stable](../../document-status.md)

Version attributes, such as `service.version`, are values of type `string`. They are
the exact version used to identify an artifact. This may be a semantic version, e.g., `1.2.3`, git hash, e.g.,
`8ae73a`, or an arbitrary version string, e.g., `0.1.2.20210101`, whatever was used when building the artifact.

## Cloud-Provider-Specific Attributes

**Status**: [Experimental](../../document-status.md)

Attributes that are only applicable to resources from a specific cloud provider. Currently, these
resources can only be defined for providers listed as a valid `cloud.provider` in
[Cloud](./cloud.md) and below. Provider-specific attributes all reside in the `cloud_provider` directory.
Expand Down
4 changes: 4 additions & 0 deletions specification/versioning-and-stability.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ For details see [how OpenTelemetry Schemas are published](schemas/README.md#open
See the [Telemetry Stability](telemetry-stability.md) document for details on how
instrumentations can use schemas to change the instrumentation they produce.

**Exception:** Some resource attributes are embedded in various locations of the
Specification, e.g. the `service.*` attributes which are required by SDKs to be
produced and have corresponding [environment variables defined in general SDK configuration](sdk-environment-variables.md#general-sdk-configuration).
jsuereth marked this conversation as resolved.
Show resolved Hide resolved
jsuereth marked this conversation as resolved.
Show resolved Hide resolved

In addition to the 3 types of changes described above there are certain types
that are always allowed. Such changes do not need to be described (and are not
described) by schema files. Here is the list of such changes:
Expand Down