Skip to content

Commit 3191265

Browse files
committed
CHANGELOG
1 parent 823bc41 commit 3191265

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@ Increment the:
2424
* [SDK] Update default exemplar reservoir size for exponential histograms
2525
[#3551](https://github.com/open-telemetry/opentelemetry-cpp/pull/3551)
2626

27+
* [SDK] View should not have a unit
28+
[#3552](https://github.com/open-telemetry/opentelemetry-cpp/pull/3552)
29+
30+
Breaking changes:
31+
32+
* [SDK] View should not have a unit
33+
[#3552](https://github.com/open-telemetry/opentelemetry-cpp/pull/3552)
34+
* The `unit` parameter has been removed from the `View` constructor
35+
and `ViewFactory::Create` methods.
36+
* Please adjust SDK configuration code accordingly.
37+
2738
## [1.22 2025-07-11]
2839

2940
* [DOC] Udpate link to membership document

examples/prometheus/main.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void InitMetrics(const std::string &name, const std::string &addr)
6666

6767
auto meter_selector = metrics_sdk::MeterSelectorFactory::Create(name, version, schema);
6868

69-
auto sum_view = metrics_sdk::ViewFactory::Create(counter_name, "description", counter_unit,
69+
auto sum_view = metrics_sdk::ViewFactory::Create(counter_name, "description",
7070
metrics_sdk::AggregationType::kSum);
7171

7272
p->AddView(std::move(instrument_selector), std::move(meter_selector), std::move(sum_view));
@@ -80,8 +80,8 @@ void InitMetrics(const std::string &name, const std::string &addr)
8080

8181
auto histogram_meter_selector = metrics_sdk::MeterSelectorFactory::Create(name, version, schema);
8282

83-
auto histogram_view = metrics_sdk::ViewFactory::Create(
84-
histogram_name, "description", histogram_unit, metrics_sdk::AggregationType::kHistogram);
83+
auto histogram_view = metrics_sdk::ViewFactory::Create(histogram_name, "description",
84+
metrics_sdk::AggregationType::kHistogram);
8585

8686
p->AddView(std::move(histogram_instrument_selector), std::move(histogram_meter_selector),
8787
std::move(histogram_view));

0 commit comments

Comments
 (0)