Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo committed Apr 28, 2022
1 parent 9e1a744 commit f819205
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/prometheus/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ void initMetrics(const std::string &name, const std::string &addr)

std::unique_ptr<metrics_sdk::MetricExporter> exporter{
new metrics_exporter::PrometheusExporter(opts)};
std::vector<std::unique_ptr<metrics_sdk::MetricExporter>> exporters;

std::string version{"1.2.0"};
std::string schema{"https://opentelemetry.io/schemas/1.2.0"};
Expand All @@ -49,9 +48,8 @@ void initMetrics(const std::string &name, const std::string &addr)
options.export_timeout_millis = std::chrono::milliseconds(500);
std::unique_ptr<metrics_sdk::MetricReader> reader{
new metrics_sdk::PeriodicExportingMetricReader(std::move(exporter), options)};
auto provider = std::shared_ptr<metrics_api::MeterProvider>(
new metrics_sdk::MeterProvider(std::move(exporters)));
auto p = std::static_pointer_cast<metrics_sdk::MeterProvider>(provider);
auto provider = std::shared_ptr<metrics_api::MeterProvider>(new metrics_sdk::MeterProvider());
auto p = std::static_pointer_cast<metrics_sdk::MeterProvider>(provider);
p->AddMetricReader(std::move(reader));

// counter view
Expand Down

0 comments on commit f819205

Please sign in to comment.