Skip to content

refactor: PushMetricExporter hide implementation for ResourceMetrics #2957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fraillt
Copy link
Contributor

@fraillt fraillt commented May 3, 2025

Changes

Changed PushMetricExporer::export signature. fn export(&self, metrics: ResourceMetricsRef<'_>) -> .... It is very similar to LogExporter::export, with one differences, it doesn't expose iter() method on items (metrics), but provide a collect function which accepts a lambda function which receives a lending iterator as an argument.

This design, although doesn't look very friendly from user perspective, allow to maximum flexibility on internal implementation side.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@fraillt fraillt requested a review from a team as a code owner May 3, 2025 16:48
@fraillt fraillt force-pushed the metrics-exporter-hide-resource-metrics-impl branch from 0fadae4 to 007f9fe Compare May 3, 2025 16:50
@fraillt fraillt force-pushed the metrics-exporter-hide-resource-metrics-impl branch from 007f9fe to 3b33fcf Compare May 3, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant