Skip to content

Commit

Permalink
[SCHEMA] The MetricExporter schema is unsafe (open-telemetry#110)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
  • Loading branch information
marcalff and jack-berg authored Aug 19, 2024
1 parent cc7cd37 commit a6b2d44
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased

* Adding initial instrumentation configuration schema
* Split MetricExporter into PullMetricExporter and PushMetricExporter and ensure only PushMetricExporters can be associated with PeriodicMetricReader [#110](https://github.com/open-telemetry/opentelemetry-configuration/pull/110)

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

Expand Down
21 changes: 17 additions & 4 deletions schema/meter_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"minimum": 0
},
"exporter": {
"$ref": "#/$defs/MetricExporter"
"$ref": "#/$defs/PushMetricExporter"
}
},
"required": [
Expand All @@ -45,15 +45,15 @@
"additionalProperties": false,
"properties": {
"exporter": {
"$ref": "#/$defs/MetricExporter"
"$ref": "#/$defs/PullMetricExporter"
}
},
"required": [
"exporter"
],
"title": "PullMetricReader"
},
"MetricExporter": {
"PushMetricExporter": {
"type": ["object", "null"],
"additionalProperties": true,
"minProperties": 1,
Expand All @@ -64,7 +64,20 @@
},
"console": {
"$ref": "common.json#/$defs/Console"
},
}
},
"patternProperties": {
".*": {
"type": ["object", "null"]
}
}
},
"PullMetricExporter": {
"type": ["object", "null"],
"additionalProperties": true,
"minProperties": 1,
"maxProperties": 1,
"properties": {
"prometheus": {
"$ref": "#/$defs/Prometheus"
}
Expand Down

0 comments on commit a6b2d44

Please sign in to comment.