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

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

Merged
merged 4 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,15 @@ resource:
service.name: !!str "unknown_service"
# Configure the resource schema URL.
schema_url: https://opentelemetry.io/schemas/1.16.0
# Configure resource detectors.
detectors:
# Configure disabled resource attribute keys provided by resource detectors.
#
# 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:
# Configure exact match disabled attribute key.
- process.command_args
# Configure wildcard match disabled attribute key(s).
- process.*
Copy link
Member Author

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.

16 changes: 16 additions & 0 deletions schema/resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
},
"schema_url": {
"type": "string"
},
"detectors": {
"$ref": "#/$defs/Detectors"
}
},
"$defs": {
Expand All @@ -22,6 +25,19 @@
"type": "string"
}
}
},
"Detectors": {
"title": "Detectors",
"type": "object",
"additionalProperties": false,
"properties": {
"disabled_attribute_keys": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}