open-telemetry / opentelemetry-configuration

JSON Schema definitions for OpenTelemetry file configuration
Apache License 2.0
29 stars 15 forks source link

Define resource.detectors.attributes.included/excluded #64

Closed jack-berg closed 4 months ago

jack-berg commented 8 months ago

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.