[OpenTelemetry] Semantic convention mappings: thread.*, db.*...
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 543
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 109
Description
Some OpenTelemetry fields that are not mapped and show up in the `labels.*` and `numeric_labels.*` groups.
| OpenTelemetry attribute | ECS Field | Example value | Comment |
|-------------------------|----------|-----------------|-----------|
| [thread.id](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/span-general.md#general-thread-attributes) | [process.thread.id](https://www.elastic.co/guide/en/ecs/current/ecs-process.html#field-process-thread-id) | 37 |
| [thread.name](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/span-general.md#general-thread-attributes) | [process.thread.name](https://www.elastic.co/guide/en/ecs/current/ecs-process.html#field-process-thread-name) | http-nio-8080-exec-2 |
| [process.runtime.description](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/process.md#process-runtimes) | | AdoptOpenJDK OpenJDK 64-Bit Server VM 11.0.11+9 | ⚠️ NOT the same as [process.title](https://www.elastic.co/guide/en/ecs/current/ecs-process.html#field-process-title) |
| [http.request_content_length](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#common-attributes) | | 123 | ⚠️ NOT same definition as [http.request.bytes](https://www.elastic.co/guide/en/ecs/current/ecs-http.html#field-http-request-bytes) |
| service.namespace |
| [db.connection_string](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#connection-level-attributes) | | postgresql://localhost:5432
| [db.operation](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md) | | INSERT
| [db.sql.table](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md) | | order_product
| net.transport | | ip_tcp | Transport protocol used. |
The readability of Otel traces is diminished by the fact that some semantic attributes are not mapped and thus displayed under `labels.*` or `numeric_labels.*` instead of being displayed in the dedicated section of the flyout ("HTTP", "Process"...).
Moreover, the integration with dependencies that is in progress is likely to require some span attributes to associate the communication with the right backend.
See also
- https://github.com/elastic/apm/pull/516

Contributor guide
Assessment
This issue has not been assessed yet.