Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move OrderMap module to root of otel-api crate #1061

Merged
merged 6 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions opentelemetry-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ pub use context::{Context, ContextGuard};

mod common;

mod order_map;

pub use order_map::OrderMap;

#[cfg(any(feature = "testing", test))]
#[doc(hidden)]
pub mod testing;
Expand Down
2 changes: 0 additions & 2 deletions opentelemetry-api/src/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ use thiserror::Error;

mod context;
pub mod noop;
mod order_map;
mod span;
mod span_context;
mod tracer;
Expand All @@ -179,7 +178,6 @@ pub use self::{
context::{
get_active_span, mark_span_as_active, FutureExt, SpanRef, TraceContextExt, WithContext,
},
order_map::OrderMap,
span::{Span, SpanKind, Status},
span_context::{SpanContext, SpanId, TraceFlags, TraceId, TraceState},
tracer::{SamplingDecision, SamplingResult, SpanBuilder, Tracer},
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-api/src/trace/tracer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::trace::OrderMap;
use crate::OrderMap;
use crate::{
trace::{Event, Link, Span, SpanId, SpanKind, Status, TraceContextExt, TraceId, TraceState},
Context, Key, KeyValue, Value,
Expand Down
3 changes: 1 addition & 2 deletions opentelemetry-sdk/src/trace/sampler.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use opentelemetry_api::trace::OrderMap;
use opentelemetry_api::{
trace::{
Link, SamplingDecision, SamplingResult, SpanKind, TraceContextExt, TraceId, TraceState,
},
Context, Key, Value,
Context, Key, OrderMap, Value,
};
use std::convert::TryInto;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crate::trace::sampler::jaeger_remote::sampling_strategy::Inner;
use crate::trace::{Sampler, ShouldSample, TraceRuntime};
use futures_util::{stream, StreamExt as _};
use http::Uri;
use opentelemetry_api::trace::{Link, OrderMap, SamplingResult, SpanKind, TraceError, TraceId};
use opentelemetry_api::{global, Context, Key, Value};
use opentelemetry_api::trace::{Link, SamplingResult, SpanKind, TraceError, TraceId};
use opentelemetry_api::{global, Context, Key, OrderMap, Value};
use opentelemetry_http::HttpClient;
use std::str::FromStr;
use std::sync::Arc;
Expand Down
8 changes: 4 additions & 4 deletions opentelemetry-sdk/src/trace/tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ use crate::{
InstrumentationLibrary,
};
use opentelemetry_api::trace::{
Link, OrderMap, SamplingDecision, SamplingResult, SpanBuilder, SpanContext, SpanId, SpanKind,
Link, SamplingDecision, SamplingResult, SpanBuilder, SpanContext, SpanId, SpanKind,
TraceContextExt, TraceFlags, TraceId, TraceState,
};
use opentelemetry_api::{Context, Key, KeyValue, Value};
use opentelemetry_api::{Context, Key, KeyValue, OrderMap, Value};
use std::fmt;
use std::sync::Weak;

Expand Down Expand Up @@ -276,10 +276,10 @@ mod tests {
};
use opentelemetry_api::{
trace::{
Link, OrderMap, SamplingDecision, SamplingResult, Span, SpanContext, SpanId, SpanKind,
Link, SamplingDecision, SamplingResult, Span, SpanContext, SpanId, SpanKind,
TraceContextExt, TraceFlags, TraceId, TraceState, Tracer, TracerProvider,
},
Context, Key, Value,
Context, Key, OrderMap, Value,
};

#[derive(Clone, Debug)]
Expand Down