otel-semantic-conventions
작성자: dash0hq
OpenTelemetry Semantic Conventions 전문가. 원격 측정 속성을 선택, 적용 또는 검토할 때 사용합니다. 속성 선택과 관련된 작업에서 트리거됩니다.
npx skills add https://github.com/dash0hq/agent-skills --skill otel-semantic-conventionsOpenTelemetry Semantic Conventions
This skill governs correct selection, placement, and validation of telemetry attributes and metric instruments according to the OpenTelemetry Semantic Conventions specification. For span naming, span kinds, and span status codes, see the otel-instrumentation skill.
The Attribute Registry is the single source of truth for all defined attributes.
Rules
| Rule | Description | Use Case |
|---|---|---|
| attributes | Attribute registry, selection, placement, common attributes by domain | Choosing or reviewing attributes; HTTP/DB/messaging/RPC attributes; attribute placement (resource vs span) |
| versioning | Semconv versioning, stability, migration | Semconv version migration |
| dash0 | Dash0 derived attributes and feature dependencies | Dash0 derived attributes |
Official documentation
- Attribute Registry
- Semantic Conventions Specification
- Semantic Conventions Repository
- Dash0 Semantic Conventions
- Dash0 Semantic Conventions Explainer
How to select the right attribute
- Search the registry first — Look up the concept in the Attribute Registry. Use the standard name if it exists (e.g., prefer
http.request.methodover a customcustom.http.verb). Custom names fragment querying and break tooling — only create a custom attribute when no registry entry covers the concept. - Check stability — Prefer
stableattributes; note anyexperimentalattributes that may change. See versioning. - Place at the correct level — Resource attributes describe the entity producing telemetry; span/log attributes describe the individual operation. Do not duplicate across levels. Once an attribute is at a given level, keep it there consistently across all services.
- Verify cardinality — Metric attribute values must be low-cardinality (bounded set). Variable data (user IDs, request paths with parameters) belongs in span attributes, not metric attributes.
- Custom attribute as last resort — Only create a custom attribute if no registry entry covers the concept. Document the decision and follow the
org.namespace.attribute_namenaming pattern.
Example: correct vs incorrect attribute selection
# Correct — uses registry attribute for HTTP method
span.set_attribute("http.request.method", "GET")
# Incorrect — invents a custom attribute for a concept already in the registry
span.set_attribute("custom.http.verb", "GET")
Example: resource vs span attribute placement
# Correct — service identity is a resource attribute
resource = Resource({"service.name": "checkout-service", "service.version": "2.1.0"})
# Correct — operation-specific data is a span attribute
span.set_attribute("http.request.method", "POST")
span.set_attribute("http.response.status_code", 201)
# Incorrect — placing a resource-level attribute on every span
span.set_attribute("service.name", "checkout-service") # belongs on the resource
Example: cardinality violation in metric attributes
# Correct — metric attribute uses a bounded, low-cardinality value
histogram.record(duration_ms, {"http.request.method": "GET", "http.response.status_code": 200})
# Incorrect — unbounded values as metric attributes explode storage and query cost
histogram.record(duration_ms, {"user.id": "u-839201", "url.path": "/orders/839201"})
# Fix: move high-cardinality values to span attributes instead
span.set_attribute("user.id", "u-839201")
span.set_attribute("url.path", "/orders/839201")
dash0hq의 다른 스킬
otel-collector
dash0hq
OpenTelemetry Collector 구성 및 배포에 대한 전문 가이드입니다. Collector 파이프라인 설정, 리시버, 익스포터 구성 시 사용하세요.
official
otel-instrumentation
dash0hq
OpenTelemetry 계측을 위한 트레이스 스팬을 구성하고, 사용자 정의 메트릭을 정의하며, 로그 내보내기를 설정하고, 샘플링 전략을 최적화합니다. 다음 경우에 사용하세요…
official
otel-ottl
dash0hq
OpenTelemetry Transformation Language (OTTL) 전문가. OTTL 표현식을 작성하거나 디버깅할 때 사용하며, 이를 지원하는 모든 OpenTelemetry Collector 구성 요소에 대해 사용합니다.
official