Add process resource detector attribute toggles - #673
Conversation
3039327 to
bd04ce3
Compare
There was a problem hiding this comment.
Pull request overview
Adds explicit per-attribute toggles to ExperimentalProcessResourceDetector so process.command_args and process.command_line are opt-in (not emitted unless configured), and propagates that contract through the generated schema and docs.
Changes:
- Extend the resource schema with
command_args/developmentandcommand_line/developmentproperties plus a sharedExperimentalProcessResourceDetectorAttributetype. - Update generated/compiled artifacts (JSON schema, schema docs, language support metadata) to reflect the new properties and their default behavior.
- Update the resource “kitchen sink” snippet and changelog entry to document the new configuration surface.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| snippets/Resource_kitchen_sink.yaml | Demonstrates configuring the new process attribute toggles in a resource snippet. |
| schema/resource.yaml | Adds the new opt-in properties and attribute-toggle sub-type to the resource schema. |
| schema/meta_schema_language_php.yaml | Marks the new properties/type as not implemented for PHP metadata. |
| schema/meta_schema_language_js.yaml | Marks the new properties/type as not implemented for JS metadata. |
| schema/meta_schema_language_java.yaml | Marks the new properties/type as not implemented for Java metadata. |
| schema/meta_schema_language_go.yaml | Marks the new properties/type as not implemented for Go metadata. |
| schema/meta_schema_language_cpp.yaml | Adds language metadata entry for the new attribute-toggle type. |
| schema-docs.md | Updates generated schema documentation and language-support tables for the new properties/type. |
| opentelemetry_configuration.json | Updates the compiled JSON schema with the new defs/properties. |
| language-support-status.md | Updates the aggregated language support matrix to include the new type and properties. |
| CHANGELOG.md | Documents the schema change in the Unreleased section. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bd04ce3 to
589d91f
Compare
| "additionalProperties": false, | ||
| "properties": { | ||
| "command_args/development": { | ||
| "$ref": "#/$defs/ExperimentalProcessResourceDetectorAttribute", |
There was a problem hiding this comment.
Are you adding dedicated types to these (vs simpler boolean enabled flag) because you anticipate more configuration options? I.e. something like filtering the content of command args and command line?
marcalff
left a comment
There was a problem hiding this comment.
If we add new enable/disabled flags, how does this works with the existing included/excluded attributes ?
To illustrate, what does this conf mean in practice ?
file_format: "1.1"
resource:
detection/development:
detectors:
- process:
command_args/development:
enabled: true
command_line/development:
enabled: false
attributes:
included:
- process.command_line
excluded:
- process.command_args
my assumption is that the detector-level enabled flags configure and determine what's emitted by the resource detector itself: while the resource detectors are unaware of the overall flags which are applied afterwards: it's not an amazing story but not thinking of a better story if we want to disable these by default (unless we want to pursue a much bigger change to attach sensitivity to emitted resource attributes and have SDK default not emit "sensitive" attributes by default). |
Add explicit
command_args/developmentandcommand_line/developmenttoggles toExperimentalProcessResourceDetectorsoprocess.command_argsandprocess.command_lineare not emitted unless configured. The PR updates the compiled schema, resource snippet, generated schema docs, language support metadata, and changelog.Resolves #671.