#![warn(
future_incompatible,
missing_debug_implementations,
missing_docs,
nonstandard_style,
rust_2018_idioms,
unreachable_pub,
unused
)]
#![allow(clippy::needless_doctest_main)]
#![cfg_attr(
docsrs,
feature(doc_cfg, doc_auto_cfg),
deny(rustdoc::broken_intra_doc_links)
)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/open-telemetry/opentelemetry-rust/main/assets/logo.svg"
)]
#![cfg_attr(test, deny(warnings))]
pub mod global;
pub mod baggage;
mod context;
pub use context::{Context, ContextGuard};
mod common;
#[cfg(any(feature = "testing", test))]
#[doc(hidden)]
pub mod testing;
pub use common::{Array, ExportError, InstrumentationLibrary, Key, KeyValue, StringValue, Value};
#[cfg(feature = "metrics")]
#[cfg_attr(docsrs, doc(cfg(feature = "metrics")))]
pub mod attributes;
#[cfg(feature = "metrics")]
#[cfg_attr(docsrs, doc(cfg(feature = "metrics")))]
pub mod metrics;
pub mod propagation;
#[cfg(feature = "trace")]
#[cfg_attr(docsrs, doc(cfg(feature = "trace")))]
pub mod trace;
#[doc(hidden)]
#[cfg(any(feature = "metrics", feature = "trace"))]
pub mod time {
use std::time::SystemTime;
#[doc(hidden)]
#[cfg(not(target_arch = "wasm32"))]
pub fn now() -> SystemTime {
SystemTime::now()
}
#[doc(hidden)]
#[cfg(target_arch = "wasm32")]
pub fn now() -> SystemTime {
SystemTime::UNIX_EPOCH + std::time::Duration::from_millis(js_sys::Date::now() as u64)
}
}