Skip to content

Commit

Permalink
Update type_descriptions.yaml with stream include/exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Sep 19, 2024
1 parent fc10dae commit e9310fd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
15 changes: 10 additions & 5 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,16 @@ meter_provider:
without_scope_info: false
# Configure Prometheus Exporter to add resource attributes as metrics attributes.
with_resource_constant_labels:
# Configure resource attributes to be included.
# Configure resource attributes to be included. If not set, no resource attributes are included.
# Attribute keys from resources are evaluated to match as follows:
# * If the value of the attribute key exactly matches.
# * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
included:
- "service*"
# 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).
# Configure resource attributes to be excluded. Applies after .with_resource_constant_labels.included (i.e. excluded has higher priority than included).
# Attribute keys from resources are evaluated to match as follows:
# * If the value of the attribute key exactly matches.
# * If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
excluded:
- "service.attr1"
# Configure metric producers.
Expand Down Expand Up @@ -200,12 +206,11 @@ meter_provider:
record_min_max: true
# Configure attribute keys retained in the resulting stream(s).
attribute_keys:
# Configure list of attribute keys to retain in the resulting stream(s).
# All other attributes are dropped.
# Configure list of attribute keys to include in the resulting stream(s). All other attributes are dropped. If not set, stream attributes are not configured.
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).
# Configure list of attribute keys to exclude from the resulting stream(s). Applies after .attribute_keys.included (i.e. excluded has higher priority than included).
excluded:
- key3

Expand Down
20 changes: 15 additions & 5 deletions schema/type_descriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,18 @@
- .meter_provider.readers[].pull.exporter.prometheus
- type: PrometheusIncludeExclude
property_descriptions:
included: Configure resource attributes to be included.
excluded: Configure resource attributes to be excluded.
included: >
Configure resource attributes to be included. If not set, no resource attributes are included.
Attribute keys from resources are evaluated to match as follows:
* If the value of the attribute key exactly matches.
* If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
excluded: >
Configure resource attributes to be excluded. Applies after .with_resource_constant_labels.included (i.e. excluded has higher priority than included).
Attribute keys from resources are evaluated to match as follows:
* If the value of the attribute key exactly matches.
* If the value of the attribute key matches the wildcard pattern, where '?' matches any single character and '*' matches any number of characters including none.
path_patterns:
- .meter_provider.readers[].pull.exporter.prometheus.with_resource_constant_labels

Expand Down Expand Up @@ -291,9 +301,9 @@
- type: StreamIncludeExclude
property_descriptions:
included: >
Configure list of attribute keys to retain in the resulting stream(s).
All other attributes are dropped.
Configure list of attribute keys to include in the resulting stream(s). All other attributes are dropped. If not set, stream attributes are not configured.
excluded: >
Configure list of attribute keys to exclude from the resulting stream(s). Applies after .attribute_keys.included (i.e. excluded has higher priority than included).
path_patterns:
- .meter_provider.views[].stream.attribute_keys

Expand Down

0 comments on commit e9310fd

Please sign in to comment.