diff --git a/examples/kitchen-sink.yaml b/examples/kitchen-sink.yaml index e9758ac..1e759ed 100644 --- a/examples/kitchen-sink.yaml +++ b/examples/kitchen-sink.yaml @@ -142,6 +142,10 @@ meter_provider: # Configure resource attributes to be excluded, in this example attribute service.attr1. excluded: - "service.attr1" + # Configure metric producers. + producers: + # Configure metric producer to be opencensus + - opencensus: {} # Configure a periodic metric reader. - periodic: # Configure delay interval (in milliseconds) between start of two consecutive exports. @@ -203,6 +207,10 @@ meter_provider: # # Environment variable: OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION default_histogram_aggregation: base2_exponential_bucket_histogram + # Configure metric producers. + producers: + # Configure metric producer to be prometheus + - prometheus: {} # Configure a periodic metric reader. - periodic: # Configure exporter. diff --git a/schema/meter_provider.json b/schema/meter_provider.json index e53372e..7b2945b 100644 --- a/schema/meter_provider.json +++ b/schema/meter_provider.json @@ -46,6 +46,12 @@ "properties": { "exporter": { "$ref": "#/$defs/MetricExporter" + }, + "producers": { + "type": "array", + "items": { + "$ref": "#/$defs/MetricProducer" + } } }, "required": [ @@ -75,6 +81,23 @@ } } }, + "MetricProducer": { + "type": "object", + "additionalProperties": true, + "minProperties": 1, + "maxProperties": 1, + "properties": { + "opencensus": { + "type": "object", + "additionalProperties": false + } + }, + "patternProperties": { + ".*": { + "type": "object" + } + } + }, "Prometheus": { "type": "object", "additionalProperties": false, @@ -103,13 +126,19 @@ "type": "object", "additionalProperties": false, "minProperties": 1, - "maxProperties": 1, + "maxProperties": 2, "properties": { "periodic": { "$ref": "#/$defs/PeriodicMetricReader" }, "pull": { "$ref": "#/$defs/PullMetricReader" + }, + "producers": { + "type": "array", + "items": { + "$ref": "#/$defs/MetricProducer" + } } } },