Skip to content

Add process resource detector attribute toggles - #673

Open
trask wants to merge 1 commit into
open-telemetry:mainfrom
trask:trask/issue-671-process-resource-detector-config
Open

Add process resource detector attribute toggles#673
trask wants to merge 1 commit into
open-telemetry:mainfrom
trask:trask/issue-671-process-resource-detector-config

Conversation

@trask

@trask trask commented Jun 26, 2026

Copy link
Copy Markdown
Member

Add explicit command_args/development and command_line/development toggles to ExperimentalProcessResourceDetector so process.command_args and process.command_line are not emitted unless configured. The PR updates the compiled schema, resource snippet, generated schema docs, language support metadata, and changelog.

Resolves #671.

@trask
trask force-pushed the trask/issue-671-process-resource-detector-config branch 8 times, most recently from 3039327 to bd04ce3 Compare June 26, 2026 20:16
@trask
trask requested a review from Copilot June 26, 2026 20:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/development and command_line/development properties plus a shared ExperimentalProcessResourceDetectorAttribute type.
  • 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.

Comment thread schema/resource.yaml
@trask
trask force-pushed the trask/issue-671-process-resource-detector-config branch from bd04ce3 to 589d91f Compare June 26, 2026 20:38
@trask
trask requested a review from Copilot June 26, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

@trask
trask marked this pull request as ready for review June 26, 2026 20:42
@trask
trask requested a review from a team as a code owner June 26, 2026 20:42
"additionalProperties": false,
"properties": {
"command_args/development": {
"$ref": "#/$defs/ExperimentalProcessResourceDetectorAttribute",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 marcalff left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@trask

trask commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

If we add new enable/disabled flags, how does this works with the existing included/excluded attributes ?

my assumption is that the detector-level enabled flags configure and determine what's emitted by the resource detector itself:

  detection/development:
    detectors:
      - process:
          command_args/development:
            enabled: true
          command_line/development:
            enabled: false

while the resource detectors are unaware of the overall flags which are applied afterwards:

  detection/development:
    attributes:
      included:
        - process.command_line
      excluded:
        - process.command_args

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should ExperimentalProcessResourceDetector emit process.command_args and process.command_line by default?

5 participants