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

Add the short_name scope attribute #2702

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 18 additions & 0 deletions semantic_conventions/scope/scope.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
groups:
- id: scope
prefix: ""
type: scope
brief: >
Scope attributes
attributes:
- id: short_name
type: string
requirement_level: recommended
brief: >
The short name for the instrumentation scope, which should generally be less than 15
characters, and generally consist of a single word. It is not required to be globally
unique, but should be unique enough to make it very unlikely to collide with other short
names. An example use is as the [namespace](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#metric-naming-and-namespaces)
(prefix) for OpenMetrics metric names. It is recommended for the short_name to be
related to the name of the scope.
examples: ['mylibrary', 'otelmacaron']
11 changes: 11 additions & 0 deletions specification/scope/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Scope Semantic Conventions
dashpole marked this conversation as resolved.
Show resolved Hide resolved

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

This document defines standard attributes for the [instrumentation scope](../glossary.md#instrumentation-scope).

<!-- semconv scope -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `short_name` | string | The short name for the instrumentation scope, which should generally be less than 15 characters, and generally consist of a single word. It is not required to be globally unique, but should be unique enough to make it very unlikely to collide with other short names. An example use is as the [namespace](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#metric-naming-and-namespaces) (prefix) for OpenMetrics metric names. It is recommended for the short_name to be related to the name of the scope. | `mylibrary`; `otelmacaron` | Recommended |
<!-- endsemconv -->