-
Notifications
You must be signed in to change notification settings - Fork 19
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
Define resource.detectors.attributes.included/excluded #64
Conversation
…te keys provided by detectors
examples/kitchen-sink.yaml
Outdated
# Configure exact match disabled attribute key. | ||
- process.command_args | ||
# Configure wildcard match disabled attribute key(s). | ||
- process.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed in the 1/8/24 configuration SIG:
- Decided to move this property up to the top level instead of nesting under detectors. This solves any ambiguity issues about whether attributes like
telemetry.sdk.*
are included in the set, since those may be part of the default resource or provided by resource detectors. - Discussed whether wildcard syntax is sufficient. Opened Default config file template that incorporates standard env vars #55 to discuss. I propose we stick with wildcard syntax for now and use user feedback to determine if full regex support is needed before a 1.x release.
- Discussed whether it would also be useful to match on resource values. Answer is probably? Could add
disabled_attribute_values
in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the 29-Apr-2024 meeting, the recommendation here is to follow the same pattern for this and prometheus resource attributes in #67
examples/kitchen-sink.yaml
Outdated
# Attribute keys are evaluated to match disabled_attribute_keys in the following manner: | ||
# * 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. | ||
disabled_attribute_keys: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could be an included
/excluded
list under attributes
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scratch that. .resource.attributes
is currently a map with key values which directly reflect the resource attributes. Its odd to have special-case included
and excluded
keys which have values following different rules.
Lets nest included
and excluded
under something which indicates that we're referring to attributes from resource detectors. Maybe something like:
resource:
detectors:
attributes:
included:
- foo*
- b?r
excluded:
- baz
Nesting included
and excluded
under .resource.detectors.attributes
because:
- We might want to configure other things related to resource detectors
- If
included
andexcluded
are directly under.resource.detectors
, then its not clear that we're including / excluding attributes vs. detectors themselves
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a commit which reflect this. ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
…y-configuration into resource-detectors
The specification defines the concept of resource detectors, which automatically provide resource information based on the environment.
We need to give the user the ability to disable these keys, as they can contain sensitive information (i.e.
process.command_line
often contains secrets for java) or just not be valuable to the user.This PR introduces
resource.disabled_attribute_keys
, an array of strings defining attribute keys from resource detectors that should be disabled. Entries in the array can exactly match an attribute key, or can use a basic pattern matching syntax (inherited from metrics view instrument selection criteria) supporting?
single character any match, and*
any number of character any match including none.The effect is that
disabled_attribute_keys
acts as a disallow list. We may wish to add an allow list variant in the future, but disabling keys is much more common so let's start there.