Skip to content

otelconf: Ability to enable resource detectors #7252

@jade-guiton-dd

Description

@jade-guiton-dd

Problem Statement

It is not currently possible to configure resource detectors through otelconf. My specific use case would be adding container.id to the Collector's internal telemetry using the container detector.

Proposed Solution

Version 0.4.0 of opentelemetry-configuration was released a few weeks ago. Among many other things, it adds the ability to explicitly configure resource detectors. Implementing this version of the configuration in otelconf with the existing resource detectors from opentelemetry-go would solve my issue.

Alternatives

A more short-term solution would be to enable all available resource detectors by default, and filter the attributes they generate based on resource::detectors::attributes. According to this PR, this seems to have been the intent for version 0.3.0.

The lack of support can be worked around by using external detection code and injecting the resolved values into the configuration, but this may not always be easy or possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: file-configRelated to file-based configurationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions