Skip to content

Commit

Permalink
fix: update attribute_keys to include type
Browse files Browse the repository at this point in the history
This updates the stream's `attribute_keys` configuration to an include/exclude style object that
currently only supports `included`. This is in hope to support `excluded` in the future once the
specification allows it.

Fixes open-telemetry#98

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten committed Aug 19, 2024
1 parent a6b2d44 commit 387251b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* 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)
* Update `attribute_keys` from array to to Include type

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

Expand Down
6 changes: 4 additions & 2 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ meter_provider:
record_min_max: true
# Configure attribute keys retained in the resulting stream(s).
attribute_keys:
- key1
- key2
# Configure list of attribute key patterns attribute keys retained in the resulting stream(s).
included:
- key1
- key2

# Configure text map context propagators.
#
Expand Down
12 changes: 12 additions & 0 deletions schema/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
}
}
},
"Include": {
"type": "object",
"additionalProperties": false,
"properties": {
"included": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"Otlp": {
"type": ["object", "null"],
"additionalProperties": false,
Expand Down
5 changes: 1 addition & 4 deletions schema/meter_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,7 @@
}
},
"attribute_keys": {
"type": "array",
"items": {
"type": ["string", "null"]
}
"$ref": "common.json#/$defs/Include"
}
}
}
Expand Down

0 comments on commit 387251b

Please sign in to comment.