Skip to content

Conversation

@HudsonHumphries
Copy link
Member

This PR implements the OStream Exporter for the metrics data pipeline. This MetricsExporter takes data in from the Controller in the form of Records. The exporter then takes the records and gets all of the relevant data out of it and sends it to an ostream. The default configuration is to send the recordable data to stdout. Unlike SpanExporters, metrics exporters are currently not required to implement a Shutdown() function.

This PR contains a lot of code from PRs currently open. These should either be removed from this PR before merging or should be merged before this one is. Please only review the exporter portion of this PR and redirect all feedback on Aggregators to their specific PRs.

CI Tests were not running on the old PR, so I made a new one.

@HudsonHumphries
Copy link
Member Author

@reyang @pyohannes This PR should be ready for review and can be merged once the Sketch Aggregator is merged.

auto agg = nostd::get<std::shared_ptr<sdkmetrics::Aggregator<T>>>(value);
auto aggKind = agg->get_aggregator_kind();

if (agg != nullptr)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we simply the flow here:

  1. short circuit if agg == nullptr.
  2. use switch case for the conditions.

So the flow would look like:

if (!agg) return;
switch (aggKind) {
case x:
  // do something
  break;
}

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with minor suggestions.

@reyang reyang added the pr:please-merge This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.) label Aug 4, 2020
@HudsonHumphries
Copy link
Member Author

HudsonHumphries commented Aug 4, 2020

Addressed comments and rebased @reyang Let me know if I didn't address your comments correctly.

@reyang reyang merged commit 6631930 into open-telemetry:master Aug 4, 2020
@HudsonHumphries
Copy link
Member Author

Design document can be found here

@open-telemetry open-telemetry deleted a comment from reagankan May 26, 2025
GerHobbelt pushed a commit to GerHobbelt/opentelemetry-cpp that referenced this pull request Jun 17, 2025
chore(deps): update dependency ubuntu to v24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:please-merge This PR is ready to be merged by a Maintainer (rebased, CI passed, has enough valid approvals, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants