Skip to content

[receiver_creator] Started components not reporting status #39053

Open
@rogercoll

Description

@rogercoll

Component(s)

receiver/receivercreator

Is your feature request related to a problem? Please describe.

The receiver creator dynamically starts and stops the configured components based on the watcher rules. This is done by "manually" initiating these components using the GetFactory exposed method and sharing the telemetry consumer.

As the start-up is not managed by the collector's internal services, the ReportStatus interface is not being used. As a result, the spawned components and their runtime status are not reflected in other components like the healthcheck extension (e.g curl http://localhost:13133/health/status?verbose). The following screenshot shows that receiver_creator status is being shown by the healtcheck extension, but not the started redis receiver:

Image

Another involved component that might report inaccurate output is the zpages extension, either the inner receiver is running or not, it will not appear in the pipelines overview (http://localhost:55679/debug/pipelinez):

Image

Describe the solution you'd like

Component status reporting for any spawned component.

Describe alternatives you've considered

Extending the service core package to dynamically add/remove receivers from the pipeline. → that would prevent the need of the GetFactory cast method and would easily be able to report component's status.

Additional context

Configuration used:

extensions:
  zpages:
  healthcheckv2:
    use_v2: true
    http:
      endpoint: "localhost:13133"
      status:
        enabled: true
        path: "/health/status"
      config:
        enabled: true
        path: "/health/config"
  docker_observer:

receivers:
  receiver_creator:
    watch_observers: [docker_observer]
    receivers:
      redis/on_container:
        rule: type == "container" && port == 6379
        resource_attributes:
          service.name: redis_on_container
        config:
          endpoint: "localhost:6379"
          collection_interval: 10s

exporters:
  debug:
service:
  pipelines:
    metrics:
      receivers: [receiver_creator]
      processors: []
      exporters: [debug]
  extensions: [zpages, docker_observer, healthcheckv2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestnever staleIssues marked with this label will be never staled and automatically removedreceiver/receivercreator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions