Skip to content

Set values coming from OTEL_NODE_RESOURCE_DETECTORS when using config file #5980

@maryliag

Description

@maryliag

The values coming from OTEL_NODE_RESOURCE_DETECTORS should be set into the configModel, probably using something like

"ExperimentalResourceDetection": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "attributes": {
                    "$ref": "common.json#/$defs/IncludeExclude"
                },
                "detectors": {
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/ExperimentalResourceDetector"
                    }
                }
            }
        },

from here

such as

  # Configure resource detection.
  # This type is in development and subject to breaking changes in minor versions.
  # If omitted or null, resource detection is disabled.
  detection/development:
    # Configure attributes provided by resource detectors.
    attributes:
      # Configure list of attribute key patterns to include from resource detectors.
      # Attribute keys from resource detectors are evaluated to match as follows:
      #  * 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.
      # If omitted, all attributes are included.
      included:
        - process.*
      # Configure list of attribute key patterns to exclude from resource detectors. Applies after .resource.detectors.attributes.included (i.e. excluded has higher priority than included).
      # Attribute keys from resource detectors are evaluated to match as follows:
      #  * 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.
      # If omitted, .included attributes are included.
      excluded:
        - process.command_args
    # Configure resource detectors.
    # Resource detector names are dependent on the SDK language ecosystem. Please consult documentation for each respective language. 
    # If omitted or null, no resource detectors are enabled.
    detectors:
      - # Enable the container resource detector, which populates container.* attributes.
        container:
      - # Enable the host resource detector, which populates host.* and os.* attributes.
        host:
      - # Enable the process resource detector, which populates process.* attributes.
        process:
      - # Enable the service detector, which populates service.name based on the OTEL_SERVICE_NAME environment variable and service.instance.id.
        service:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Pick-up

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions