Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MetricReader invalid configurations #148

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Improved file_format documentation. [#137](https://github.com/open-telemetry/opentelemetry-configuration/pull/137)
* Periodic exporter interval default value is inconsistent [#143](https://github.com/open-telemetry/opentelemetry-configuration/pull/143)
* Fix MetricReader invalid configurations [#148](https://github.com/open-telemetry/opentelemetry-configuration/pull/148)

## [v0.3.0] - 2024-05-08

Expand Down
14 changes: 6 additions & 8 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ meter_provider:
# If omitted, .included resource attributes are included.
excluded:
- "service.attr1"
# Configure metric producers.
producers:
- # Configure metric producer to be opencensus.
opencensus:
# Configure metric producers.
producers:
- opencensus:
- # Configure a periodic metric reader.
periodic:
# Configure delay interval (in milliseconds) between start of two consecutive exports.
Expand Down Expand Up @@ -185,10 +184,9 @@ meter_provider:
# Configure default histogram aggregation. Values include: explicit_bucket_histogram, base2_exponential_bucket_histogram. For behavior of values, see https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/otlp.md.
# If omitted or null, explicit_bucket_histogram is used.
default_histogram_aggregation: base2_exponential_bucket_histogram
# Configure metric producers.
producers:
- # Configure metric producer to be prometheus.
prometheus:
# Configure metric producers.
producers:
- prometheus:
- # Configure a periodic metric reader.
periodic:
# Configure exporter.
Expand Down
20 changes: 13 additions & 7 deletions schema/meter_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
},
"exporter": {
"$ref": "#/$defs/PushMetricExporter"
},
"producers": {
"type": "array",
"items": {
"$ref": "#/$defs/MetricProducer"
}
}
},
"required": [
Expand All @@ -57,6 +63,12 @@
"properties": {
"exporter": {
"$ref": "#/$defs/PullMetricExporter"
},
"producers": {
"type": "array",
"items": {
"$ref": "#/$defs/MetricProducer"
}
}
},
"required": [
Expand Down Expand Up @@ -144,19 +156,13 @@
"type": "object",
"additionalProperties": false,
"minProperties": 1,
"maxProperties": 2,
"maxProperties": 1,
"properties": {
"periodic": {
"$ref": "#/$defs/PeriodicMetricReader"
},
"pull": {
"$ref": "#/$defs/PullMetricReader"
},
"producers": {
"type": "array",
"items": {
"$ref": "#/$defs/MetricProducer"
}
}
}
},
Expand Down
6 changes: 4 additions & 2 deletions schema/type_descriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,13 @@
property_descriptions:
pull: Configure a pull based metric reader.
periodic: Configure a periodic metric reader.
producers: Configure metric producers.
path_patterns:
- .meter_provider.readers[]

- type: PullMetricReader
property_descriptions:
exporter: Configure exporter.
producers: Configure metric producers.
path_patterns:
- .meter_provider.readers[].pull

Expand All @@ -349,6 +349,7 @@

If omitted or null, 30000 is used.
exporter: Configure exporter.
producers: Configure metric producers.
path_patterns:
- .meter_provider.readers[].periodic

Expand All @@ -357,7 +358,8 @@
opencensus: Configure metric producer to be opencensus.
prometheus: Configure metric producer to be prometheus.
path_patterns:
- .meter_provider.readers[].producers[]
- .meter_provider.readers[].producers[].pull
- .meter_provider.readers[].producers[].periodic

- type: MetricExporter
property_descriptions:
Expand Down
Loading