Skip to content

PeriodicExportingMetricReader::Shutdown should include effects of ForceFlush #4542

Description

@danielgblanco

Per open-telemetry/opentelemetry-specification#2983 and its fix, open-telemetry/opentelemetry-specification#5305, the metrics spec would require the periodic exporting MetricReader to collect and export whatever metrics were recorded since the last periodic tick before the underlying exporter is shut down.

I'm not experienced in opentelemetry-cpp or its codebase, but the following AI-assisted analysis seems to confirm PeriodicExportingMetricReader::Shutdown doesn't currently do this:

Metrics recorded since the last periodic tick appear to be silently dropped on shutdown. I'd like to know if it's possible for Shutdown() to perform one last collect-and-export cycle (the same effect as ForceFlush() or just calling ForceFlush()) before the exporter is shut down.

Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedGood for taking. Extra help will be provided by maintainersspec-complianceNot compliant to OpenTelemetry specstriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions