Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
// workspace dictionary.
"words": [
"actix",
"anyvalue",
"appender",
"appenders",
"Bhasin",
Expand Down
5 changes: 4 additions & 1 deletion opentelemetry-stdout/src/logs/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
fn print_logs(batch: LogBatch<'_>) {
for (i, log) in batch.iter().enumerate() {
println!("Log #{}", i);
let (record, _library) = log;
let (record, library) = log;

println!("\t Instrumentation Scope: {:?}", library);

Check warning on line 80 in opentelemetry-stdout/src/logs/exporter.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-stdout/src/logs/exporter.rs#L78-L80

Added lines #L78 - L80 were not covered by tests

if let Some(event_name) = record.event_name() {
println!("\t EventName: {:?}", event_name);
}
Expand Down
3 changes: 1 addition & 2 deletions opentelemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ js-sys = "0.3.63"
default = ["trace", "metrics", "logs", "internal-logs"]
trace = ["pin-project-lite", "futures-sink", "futures-core", "thiserror"]
metrics = []
testing = ["trace", "metrics"]
testing = ["trace"]
logs = []
spec_unstable_logs_enabled = ["logs"]
otel_unstable = []
internal-logs = ["tracing"]

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry/src/global/internal_logging.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(unused_macros)]
///
/// **Note**: These macros (`otel_info!`, `otel_warn!`, `otel_debug!`, and `otel_error!`) are intended to be used
/// **internally within OpenTelemetry code** or for **custom exporters and processors**. They are not designed
/// **internally within OpenTelemetry code** or for **custom exporters, processors and other plugins**. They are not designed
/// for general application logging and should not be used for that purpose.
///
/// Macro for logging informational messages in OpenTelemetry.
Expand Down
1 change: 1 addition & 0 deletions opentelemetry/src/global/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fn global_meter_provider() -> &'static RwLock<GlobalMeterProvider> {

/// Sets the given [`MeterProvider`] instance as the current global meter
/// provider.
/// Libraries should NOT call this function. It is intended for applications/executables.
///
/// **NOTE:** This function should be called before getting [`Meter`] instances via [`meter()`] or [`meter_with_scope()`]. Otherwise, you could get no-op [`Meter`] instances.
pub fn set_meter_provider<P>(new_provider: P)
Expand Down
1 change: 1 addition & 0 deletions opentelemetry/src/global/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ pub fn tracer_with_scope(scope: InstrumentationScope) -> BoxedTracer {
/// It returns the [`TracerProvider`] instance that was previously mounted as global provider
/// (e.g. [`NoopTracerProvider`] if a provider had not been set before).
///
/// Libraries should NOT call this function. It is intended for applications/executables.
/// [`TracerProvider`]: crate::trace::TracerProvider
pub fn set_tracer_provider<P, T, S>(new_provider: P) -> GlobalTracerProvider
where
Expand Down
Loading