Skip to content

Commit f000612

Browse files
committed
fix: rebase new version of opentelemetry
1 parent a04c8fb commit f000612

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,10 @@ tracing = { version = ">=0.1.40", default-features = false }
5353
tracing-core = { version = ">=0.1.33", default-features = false }
5454
tracing-subscriber = { version = "0.3", default-features = false }
5555
url = { version = "2.5", default-features = false }
56+
portable-atomic = "1.9.0"
5657

5758
# Aviod use of crates.io version of these crates through the tracing-opentelemetry dependencies
5859
[patch.crates-io]
5960
opentelemetry = { path = "opentelemetry" }
6061
opentelemetry_sdk = { path = "opentelemetry-sdk" }
6162
opentelemetry-stdout = { path = "opentelemetry-stdout" }
62-
url = { version = "2.5.2", default-features = false } #https://github.com/servo/rust-url/issues/992
63-
portable-atomic = "1.9.0"

opentelemetry-sdk/src/metrics/internal/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@ use core::fmt;
99
use std::collections::{HashMap, HashSet};
1010
use std::mem::swap;
1111
use std::ops::{Add, AddAssign, DerefMut, Sub};
12-
use std::sync::atomic::{AtomicBool, AtomicI64, AtomicU64, AtomicUsize, Ordering};
12+
use std::sync::atomic::Ordering;
13+
14+
#[cfg(not(any(target_arch = "mips", target_arch = "powerpc")))]
15+
use std::sync::atomic::{AtomicBool, AtomicI64, AtomicU64, AtomicUsize};
16+
17+
#[cfg(any(target_arch = "mips", target_arch = "powerpc"))]
18+
use portable_atomic::{AtomicBool, AtomicI64, AtomicU64, AtomicUsize};
19+
1320
use std::sync::{Arc, OnceLock, RwLock};
1421

1522
use aggregate::{is_under_cardinality_limit, STREAM_CARDINALITY_LIMIT};
1623
pub(crate) use aggregate::{AggregateBuilder, AggregateFns, ComputeAggregation, Measure};
1724
pub(crate) use exponential_histogram::{EXPO_MAX_SCALE, EXPO_MIN_SCALE};
1825
use opentelemetry::{otel_warn, KeyValue};
1926

20-
#[cfg(any(target_arch = "mips", target_arch = "powerpc"))]
21-
use portable_atomic::{AtomicBool, AtomicI64, AtomicU64, AtomicUsize};
22-
2327
// TODO Replace it with LazyLock once it is stable
2428
pub(crate) static STREAM_OVERFLOW_ATTRIBUTES: OnceLock<Vec<KeyValue>> = OnceLock::new();
25-
#[cfg(not(any(target_arch = "mips", target_arch = "powerpc")))]
26-
use std::sync::atomic::{AtomicBool, AtomicI64, AtomicU64, AtomicUsize};
27-
28-
use crate::metrics::AttributeSet;
2929

3030
#[inline]
3131
fn stream_overflow_attributes() -> &'static Vec<KeyValue> {

0 commit comments

Comments
 (0)