diff --git a/kitchen-sink-example.yaml b/kitchen-sink-example.yaml index f95c304..173fe8c 100644 --- a/kitchen-sink-example.yaml +++ b/kitchen-sink-example.yaml @@ -56,3 +56,14 @@ tracer_provider: # # Environment variable: OTEL_LINK_ATTRIBUTE_COUNT_LIMIT link_attribute_count_limit: 128 + +# Configure resource for all signals. +resource: + # Key-value pairs to be used as resource attributes. + # + # Environment variable: OTEL_RESOURCE_ATTRIBUTES + attributes: + # Sets the value of the `service.name` resource attribute + # + # Environment variable: OTEL_SERVICE_NAME + service.name: !!str "unknown_service" diff --git a/schema/opentelemetry_configuration.json b/schema/opentelemetry_configuration.json index 311dedc..11e430d 100644 --- a/schema/opentelemetry_configuration.json +++ b/schema/opentelemetry_configuration.json @@ -29,6 +29,9 @@ }, "tracer_provider": { "$ref": "tracer_provider.json" + }, + "resource": { + "$ref": "resource.json" } }, "required": [ diff --git a/schema/resource.json b/schema/resource.json new file mode 100644 index 0000000..e6f0201 --- /dev/null +++ b/schema/resource.json @@ -0,0 +1,24 @@ +{ + "$id": "https://opentelemetry.io/otelconfig/resource.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Resource", + "type": "object", + "additionalProperties": false, + "properties": { + "attributes": { + "$ref": "#/$defs/Attributes" + } + }, + "$defs": { + "Attributes": { + "title": "Attributes", + "type": "object", + "additionalProperties": true, + "properties": { + "service.name": { + "type": "string" + } + } + } + } +}