Skip to content

Commit 0051599

Browse files
[currency] - fix metricreader export and temporality (#1335)
* default metricreader and exporter options Signed-off-by: Pierre Tessier <pierre@pierretessier.com> * default metricreader and exporter options Signed-off-by: Pierre Tessier <pierre@pierretessier.com> --------- Signed-off-by: Pierre Tessier <pierre@pierretessier.com> Co-authored-by: Juliano Costa <julianocosta89@outlook.com>
1 parent 69a28d6 commit 0051599

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ release.
1313
([#1291](https://github.com/open-telemetry/opentelemetry-demo/pull/1291))
1414
* [currencyservice] - add package name prefix to `rpc.service` attribute
1515
([#1333](https://github.com/open-telemetry/opentelemetry-demo/pull/1333))
16+
* [currency] fix metric exporter options
17+
([#1335](https://github.com/open-telemetry/opentelemetry-demo/pull/1335))
1618

1719
## 1.7.2
1820

src/currencyservice/src/meter_common.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ namespace
2424
{
2525
// Build MetricExporter
2626
otlp_exporter::OtlpGrpcMetricExporterOptions otlpOptions;
27-
2827
// Configuration via environment variable not supported yet
29-
otlpOptions.aggregation_temporality = otlp_exporter::PreferredAggregationTemporality::kDelta;
28+
//otlpOptions.aggregation_temporality = otlp_exporter::PreferredAggregationTemporality::kCumulative;
3029
auto exporter = otlp_exporter::OtlpGrpcMetricExporterFactory::Create(otlpOptions);
3130

3231
// Build MeterProvider and Reader
3332
metric_sdk::PeriodicExportingMetricReaderOptions options;
34-
options.export_interval_millis = std::chrono::milliseconds(1000);
35-
options.export_timeout_millis = std::chrono::milliseconds(500);
33+
//options.export_interval_millis = std::chrono::milliseconds(60000);
34+
//options.export_timeout_millis = std::chrono::milliseconds(30000);
3635
std::unique_ptr<metric_sdk::MetricReader> reader{
3736
new metric_sdk::PeriodicExportingMetricReader(std::move(exporter), options) };
3837
auto provider = std::shared_ptr<metrics_api::MeterProvider>(new metric_sdk::MeterProvider());

0 commit comments

Comments
 (0)