Skip to content

Commit

Permalink
stream: update stream configuration to include/exclude (#118)
Browse files Browse the repository at this point in the history
This follows open-telemetry/opentelemetry-specification#4188 to add support
to exclude attribute keys from stream configuration.

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten authored Sep 19, 2024
1 parent f89f35a commit e21ffdb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
5 changes: 4 additions & 1 deletion examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ meter_provider:
# Configure resource attributes to be included, in this example attributes starting with service.
included:
- "service*"
# Configure resource attributes to be excluded, in this example attribute service.attr1.
# Configure resource attributes to be excluded, in this example attribute service.attr1. Applies after .with_resource_constant_labels.included (i.e. excluded has higher priority than included).
excluded:
- "service.attr1"
# Configure metric producers.
Expand Down Expand Up @@ -264,6 +264,9 @@ meter_provider:
included:
- key1
- key2
# Configure list of attribute keys that are excluded in the resulting stream(s), in this example attribute key3. Applies after .attribute_keys.included (i.e. excluded has higher priority than included).
excluded:
- key3

# Configure text map context propagators.
#
Expand Down
12 changes: 0 additions & 12 deletions schema/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,6 @@
}
}
},
"Include": {
"type": "object",
"additionalProperties": false,
"properties": {
"included": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"NameStringValuePair": {
"type": "object",
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion schema/meter_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
}
},
"attribute_keys": {
"$ref": "common.json#/$defs/Include"
"$ref": "common.json#/$defs/IncludeExclude"
}
}
}
Expand Down

0 comments on commit e21ffdb

Please sign in to comment.