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..bc8284a --- /dev/null +++ b/process-context/otel_process_ctx.proto @@ -0,0 +1,40 @@ +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 + // + // 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 + 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; + + // 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. +}