Skip to content

Commit c589841

Browse files
committed
Rejig module structure to facilitate moving more into context module
1 parent 9d3a507 commit c589841

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

opentelemetry/src/context.rs opentelemetry/src/context/context_store.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
use crate::otel_warn;
23
#[cfg(feature = "trace")]
34
use crate::trace::context::SynchronizedSpan;
@@ -78,7 +79,7 @@ thread_local! {
7879
#[derive(Clone, Default)]
7980
pub struct Context {
8081
#[cfg(feature = "trace")]
81-
pub(super) span: Option<Arc<SynchronizedSpan>>,
82+
pub(crate) span: Option<Arc<SynchronizedSpan>>,
8283
entries: Option<Arc<EntryMap>>,
8384
}
8485

@@ -314,15 +315,15 @@ impl Context {
314315
}
315316

316317
#[cfg(feature = "trace")]
317-
pub(super) fn current_with_synchronized_span(value: SynchronizedSpan) -> Self {
318+
pub(crate) fn current_with_synchronized_span(value: SynchronizedSpan) -> Self {
318319
Context {
319320
span: Some(Arc::new(value)),
320321
entries: Context::map_current(|cx| cx.entries.clone()),
321322
}
322323
}
323324

324325
#[cfg(feature = "trace")]
325-
pub(super) fn with_synchronized_span(&self, value: SynchronizedSpan) -> Self {
326+
pub(crate) fn with_synchronized_span(&self, value: SynchronizedSpan) -> Self {
326327
Context {
327328
span: Some(Arc::new(value)),
328329
entries: self.entries.clone(),

opentelemetry/src/context/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
mod context_store;
2+
3+
pub use context_store::Context;
4+
pub use context_store::ContextGuard;

0 commit comments

Comments
 (0)