Skip to content

Metrics - Periodic reader calls otel.Handle with error during shutdown if collectAndExport is running #7218

@patagonia-fan

Description

@patagonia-fan

If collectAndExport is running in the run loop, and Shutdown is called, the cancel function of the run loop context will be called, and the context error propagated to otel.Handle without a way to distinguish this case from actual problematic errors.

Since data will be reported after cancellation in the Shutdown code, it would be ideal to have a way to disinguish this case to not handle it as an actual error.

Consider WithCancelCause or similar to differentiate this valid case from actual errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:metricsPart of OpenTelemetry Metrics

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions