Skip to content

Commit 9e05392

Browse files
authored
[Metrics API] Rename init to build (open-telemetry#2232)
1 parent 619ddb6 commit 9e05392

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

metrics_counter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ lazy_static! {
3131
"value1", "value2", "value3", "value4", "value5", "value6", "value7", "value8", "value9",
3232
"value10"
3333
];
34-
static ref COUNTER: Counter<u64> = PROVIDER.meter("test").u64_counter("hello").init();
34+
static ref COUNTER: Counter<u64> = PROVIDER.meter("test").u64_counter("hello").build();
3535
}
3636

3737
thread_local! {

metrics_gauge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ lazy_static! {
2828
"value1", "value2", "value3", "value4", "value5", "value6", "value7", "value8", "value9",
2929
"value10"
3030
];
31-
static ref GAUGE: Gauge<u64> = PROVIDER.meter("test").u64_gauge("test_gauge").init();
31+
static ref GAUGE: Gauge<u64> = PROVIDER.meter("test").u64_gauge("test_gauge").build();
3232
}
3333

3434
thread_local! {

metrics_histogram.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ lazy_static! {
3131
"value1", "value2", "value3", "value4", "value5", "value6", "value7", "value8", "value9",
3232
"value10"
3333
];
34-
static ref HISTOGRAM: Histogram<u64> = PROVIDER.meter("test").u64_histogram("hello").init();
34+
static ref HISTOGRAM: Histogram<u64> = PROVIDER.meter("test").u64_histogram("hello").build();
3535
}
3636

3737
thread_local! {

metrics_overflow.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ lazy_static! {
2424
static ref PROVIDER: SdkMeterProvider = SdkMeterProvider::builder()
2525
.with_reader(ManualReader::builder().build())
2626
.build();
27-
static ref COUNTER: Counter<u64> = PROVIDER.meter("test").u64_counter("hello").init();
27+
static ref COUNTER: Counter<u64> = PROVIDER.meter("test").u64_counter("hello").build();
2828
}
2929

3030
thread_local! {

0 commit comments

Comments
 (0)