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

stream: update stream configuration to include/exclude #118

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
5 changes: 4 additions & 1 deletion examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,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 @@ -262,6 +262,9 @@ meter_provider:
included:
- key1
- key2
# Configure resource attributes to be excluded, in this example attribute service.attr1.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Configure resource attributes to be excluded, in this example attribute service.attr1.
# Configure resource attributes to be excluded, in this example attribute key3.

This brings up a good point. It seems like this needs to be either a list to include, OR a list to exclude, but not both?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it? I would expect this to be similar to how resource attributes can be included or excluded. The example in the kitchen sink shows an include of service.* and an exclude of service.attr1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how SDKs would handle the presence of both include and exclude lists. I know java (and probably go) can handle.

excluded:
codeboten marked this conversation as resolved.
Show resolved Hide resolved
- 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 @@ -31,18 +31,6 @@
}
}
},
"Include": {
"type": "object",
"additionalProperties": false,
"properties": {
"included": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"Otlp": {
"type": ["object", "null"],
"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 @@ -305,7 +305,7 @@
}
},
"attribute_keys": {
"$ref": "common.json#/$defs/Include"
"$ref": "common.json#/$defs/IncludeExclude"
}
}
}
Expand Down
Loading