Skip to content

[receiver/hostmetrics] should report scraper that failed in case of error #35814

Open
@pjanotti

Description

@pjanotti

Component(s)

receiver/hostmetrics

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

In case of error the receiver/hostmetrics doesn't report which scraper failed, e.g.:

1729010081650,"2024-10-15T16:34:41.650Z	error	scraperhelper/scrapercontroller.go:205	Error scraping metrics	{""kind"": ""receiver"", ""name"": ""hostmetrics"", ""data_type"": ""metrics"", ""error"": ""failed to read usage at /boot/efi: no such file or directory"", ""scraper"": ""hostmetrics""}"
1729010081650,go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).scrapeMetricsAndReport
1729010081650,	go.opentelemetry.io/collector/[email protected]/scraperhelper/scrapercontroller.go:205
1729010081650,go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).startScraping.func1
1729010081650,	go.opentelemetry.io/collector/[email protected]/scraperhelper/scrapercontroller.go:181

Describe the solution you'd like

The error message should include the scraper name so the user can consider disabling it or changing some config setting.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions