Skip to content

Commit

Permalink
[currency] - fix metricreader export and temporality (open-telemetry#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
2 people authored and kabrol98 committed Jan 24, 2024
1 parent 6cbad4c commit 15bf729
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 4 deletions.
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,61 @@ release.

## Unreleased

* [grafana] update grafana to 10.2.3
([#1332](https://github.com/open-telemetry/opentelemetry-demo/pull/1332))
* [frontendproxy] Enable envoy environment resource detector
([#1291](https://github.com/open-telemetry/opentelemetry-demo/pull/1291))
* [currencyservice] - add package name prefix to `rpc.service` attribute
([#1333](https://github.com/open-telemetry/opentelemetry-demo/pull/1333))
* [currency] fix metric exporter options
([#1335](https://github.com/open-telemetry/opentelemetry-demo/pull/1335))

## 1.7.2

* [cartservice] update .NET package to 1.7.0 release
([#1326](https://github.com/open-telemetry/opentelemetry-demo/pull/1326))
* [loadgenerator and recommendationservice] Update python base image
([#1329](https://github.com/open-telemetry/opentelemetry-demo/pull/1329))

## 1.7.1

* [grafana] revert to 10.2.0
* [cartservice] disable config reload
([#1312](https://github.com/open-telemetry/opentelemetry-demo/pull/1312))
* [cartservice] fixed cartServiceFailure feature flag
([#1313](https://github.com/open-telemetry/opentelemetry-demo/pull/1313))
* [accountingservice] Update dependencies and semconv
* ([#1316](https://github.com/open-telemetry/opentelemetry-demo/pull/1316))
* [featureflagservice] Allow setting initial feature flag values
([#1319](https://github.com/open-telemetry/opentelemetry-demo/pull/1319))

## 1.7.0

* update PHP quoteservice to use 1.0.0
([#1236](https://github.com/open-telemetry/opentelemetry-demo/pull/1236))
* Add ability to do probabilistic A/B testing with feature flags
([#1237](https://github.com/open-telemetry/opentelemetry-demo/pull/1237))
* add env var for pinning trace-based test tool version
([#1239](https://github.com/open-telemetry/opentelemetry-demo/pull/1239))
* [cartservice] Add .NET memory, CPU, and thread metrics
([#1265](https://github.com/open-telemetry/opentelemetry-demo/pull/1265))
* [cartservice] update .NET to .NET 8.0
([#1272](https://github.com/open-telemetry/opentelemetry-demo/pull/1272))
* update loadgenerator dependencies and the base image
([#1274](https://github.com/open-telemetry/opentelemetry-demo/pull/1274))
* [currencyservice]: update opentelemetry-cpp to 1.12.0
([#1275](https://github.com/open-telemetry/opentelemetry-demo/pull/1275))
* [currencyservice] bring back multistage build
([#1276](https://github.com/open-telemetry/opentelemetry-demo/pull/1276))
* fix env var for pinning trace-based test tool version
([#1283](https://github.com/open-telemetry/opentelemetry-demo/pull/1283))
* [accountingservice] Add additional attributes to Kafka spans
([#1286](https://github.com/open-telemetry/opentelemetry-demo/pull/1286))
* [shippingservice] update Rust OTel libraries to 0.21
([#1287](https://github.com/open-telemetry/opentelemetry-demo/pull/1287))

## 1.6.0

* update PHP quoteservice to use RC1
([#1114](https://github.com/open-telemetry/opentelemetry-demo/pull/1114))
* [cartservice] update .NET package to 1.6.0 release
Expand Down
7 changes: 3 additions & 4 deletions src/currencyservice/src/meter_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ namespace
{
// Build MetricExporter
otlp_exporter::OtlpGrpcMetricExporterOptions otlpOptions;

// Configuration via environment variable not supported yet
otlpOptions.aggregation_temporality = metric_sdk::AggregationTemporality::kDelta;
//otlpOptions.aggregation_temporality = otlp_exporter::PreferredAggregationTemporality::kCumulative;
auto exporter = otlp_exporter::OtlpGrpcMetricExporterFactory::Create(otlpOptions);

// Build MeterProvider and Reader
metric_sdk::PeriodicExportingMetricReaderOptions options;
options.export_interval_millis = std::chrono::milliseconds(1000);
options.export_timeout_millis = std::chrono::milliseconds(500);
//options.export_interval_millis = std::chrono::milliseconds(60000);
//options.export_timeout_millis = std::chrono::milliseconds(30000);
std::unique_ptr<metric_sdk::MetricReader> reader{
new metric_sdk::PeriodicExportingMetricReader(std::move(exporter), options) };
auto provider = std::shared_ptr<metrics_api::MeterProvider>(new metric_sdk::MeterProvider());
Expand Down

0 comments on commit 15bf729

Please sign in to comment.