From 9c3536d87e8764511d71e90025ed42d346519a79 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Wed, 22 Oct 2025 09:13:44 +0100 Subject: [PATCH 1/3] Add development protobuf definition for process context This PR adds the protobuf definition for the specification proposed in . The `OtelProcessCtx` message is used to allow in-process libraries (such as the OTel SDKs running inside an application) to share information with outside readers (such as the OpenTelemetry eBPF Profiler). At this point, it's not clear to me if this is the final home for this file/the specification, but it looks like a good home for now while we develop and iterate on it. --- process-context/README.md | 5 +++++ process-context/otel_process_ctx.proto | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 process-context/README.md create mode 100644 process-context/otel_process_ctx.proto diff --git a/process-context/README.md b/process-context/README.md new file mode 100644 index 0000000..af2d557 --- /dev/null +++ b/process-context/README.md @@ -0,0 +1,5 @@ +# OpenTelemetry Process Context (Under development) + +This folder currently contains the development protobuf definitions for the specification proposed in https://docs.google.com/document/d/1-4jo29vWBZZ0nKKAOG13uAQjRcARwmRc4P313LTbPOE/edit?tab=t.0 . + +The `OtelProcessCtx` message is used to allow in-process libraries (such as the OTel SDKs running inside an application) to share information with outside readers (such as the OpenTelemetry eBPF Profiler). diff --git a/process-context/otel_process_ctx.proto b/process-context/otel_process_ctx.proto new file mode 100644 index 0000000..b6b89f0 --- /dev/null +++ b/process-context/otel_process_ctx.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package otel_process_ctx.v1development; + +message OtelProcessCtx { + // Additional key/value pairs as resources https://opentelemetry.io/docs/specs/otel/resource/sdk/ + // Similar to baggage https://opentelemetry.io/docs/concepts/signals/baggage/ / https://opentelemetry.io/docs/specs/otel/overview/#baggage-signal + map resources = 1; + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/deployment/#deployment-environment-name + string deployment_environment_name = 2; + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/service/#service-instance-id + string service_instance_id = 3; + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/service/#service-name + string service_name = 4; + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/service/#service-version + string service_version = 5; + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/telemetry/#telemetry-sdk-language + string telemetry_sdk_language = 6; + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/telemetry/#telemetry-sdk-version + string telemetry_sdk_version = 7; + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/telemetry/#telemetry-sdk-name + string telemetry_sdk_name = 8; +} From e50806d0e0e9dde2350c706598e950598676f29b Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Wed, 29 Oct 2025 12:05:45 +0000 Subject: [PATCH 2/3] Document priority of resources and expected semantics for first-class fields --- process-context/otel_process_ctx.proto | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/process-context/otel_process_ctx.proto b/process-context/otel_process_ctx.proto index b6b89f0..de085f0 100644 --- a/process-context/otel_process_ctx.proto +++ b/process-context/otel_process_ctx.proto @@ -5,7 +5,18 @@ package otel_process_ctx.v1development; message OtelProcessCtx { // Additional key/value pairs as resources https://opentelemetry.io/docs/specs/otel/resource/sdk/ // Similar to baggage https://opentelemetry.io/docs/concepts/signals/baggage/ / https://opentelemetry.io/docs/specs/otel/overview/#baggage-signal + // + // Providing resources is optional. + // + // If a key in this field would match one of the attributes already defined as a first-class field below (e.g. `service.name`), + // the first-class field must always take priority. + // Readers MAY choose to fallback to a value in `resources` if its corresponding first-class field is empty, or they CAN ignore it. map resources = 1; + + // We strongly recommend that the following first-class fields are provided, but they can be empty if needed. + // In particular for `deployment_environment_name` and `service_version` often need to be configured for a given application + // and cannot be inferred. For the others, see the semantic conventions documentation for recommended ways of setting them. + // https://opentelemetry.io/docs/specs/semconv/registry/attributes/deployment/#deployment-environment-name string deployment_environment_name = 2; // https://opentelemetry.io/docs/specs/semconv/registry/attributes/service/#service-instance-id From d239ca786f94fe85a08a2b1127105e967d2b19b6 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Wed, 29 Oct 2025 12:08:41 +0000 Subject: [PATCH 3/3] Document criteria for adding first-class fields --- process-context/otel_process_ctx.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/process-context/otel_process_ctx.proto b/process-context/otel_process_ctx.proto index de085f0..bc8284a 100644 --- a/process-context/otel_process_ctx.proto +++ b/process-context/otel_process_ctx.proto @@ -31,4 +31,10 @@ message OtelProcessCtx { string telemetry_sdk_version = 7; // https://opentelemetry.io/docs/specs/semconv/registry/attributes/telemetry/#telemetry-sdk-name string telemetry_sdk_name = 8; + + // New first-class fields should be added only if: + // * Providing them is strongly recommended + // * They match a new or existing OTEL semantic convention + // + // Otherwise, `resources` should be used instead. }