Should OpenTelemetry SDKs automatically generate a process.runtime.description resource attribute?
0 reputation · 04 Dec 2024, 10:33 UTC
0 reputation · 04 Dec 2024, 10:33 UTC
Determine whether the OpenTelemetry Specification should require SDKs to automatically populate a process.runtime.description resource attribute, given that current implementations differ and the spec leaves it optional.
The attribute is not mandated, so some SDKs include it while others omit it, leading to inconsistent resource data across languages. Backends that rely on this attribute for runtime identification may see missing values, and there is no agreed‑upon format for the value (e.g., Java 17.0.12 vs OpenJDK Runtime Environment).
Adding the attribute could improve observability but may introduce overhead or conflict with user‑provided resource attributes.
Questions:
process.runtime.description?32775 reputation · 04 Dec 2024, 14:42 UTC
The OpenTelemetry Specification should mandate the automatic generation of the process.runtime.description resource attribute. While currently optional, mandating this attribute ensures consistent runtime identification across polyglot environments, allowing backend observability tools to filter and group telemetry by specific runtime versions without requiring manual configuration for every service.
To avoid the current inconsistency where some SDKs provide detailed versions and others provide generic names, the following standards should be applied:
<runtime-name> <version> pattern (e.g., OpenJDK 17.0.12 or Node.js 20.10.0). This provides a human-readable string that remains machine-parsable.process.runtime.description via environment variables (such as OTEL_RESOURCE_ATTRIBUTES), the SDK must not overwrite it.The primary concern with mandating this attribute is the potential for breaking changes in existing SDKs that currently omit it. However, since this is an addition of data rather than a modification of existing fields, the impact is primarily on the backend storage (cardinality increase) rather than the application logic.
The overhead of retrieving the runtime description during SDK initialization is negligible, as this information is typically available in the process environment or via a single system call at startup.
To verify the current behavior of an SDK before and after implementing these changes, use a console exporter to inspect the Resource object:
# Example: Checking for the attribute in a Java environment via environment variables
export OTEL_TRACES_EXPORTER=console
java -jar your-app.jar
Verify that the output contains a Resource block with process.runtime.description populated according to the <name> <version> format.
To finalize the format specification, it is necessary to know if there are specific backend requirements for semantic versioning (SemVer) within the description string, or if a free-form string is sufficient for all target collectors.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.