Skip to content

Commit

Permalink
Merge branch 'main' into set_instrumentation_scope
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Jun 18, 2024
2 parents 804d79e + da368d4 commit 4c9acdf
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 14 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ debug = 1
async-std = "1.10"
async-trait = "0.1"
bytes = "1"
criterion = "0.5"
futures-core = "0.3"
futures-executor = "0.3"
futures-util = { version = "0.3", default-features = false }
Expand Down
10 changes: 4 additions & 6 deletions examples/tracing-grpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ pub mod hello_world {
async fn greet() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
let tracer = global::tracer("example/client");
let span = tracer
.span_builder(String::from("Greeter/client"))
.span_builder("Greeter/client")
.with_kind(SpanKind::Client)
.with_attributes(vec![KeyValue::new("component", "grpc")])
.with_attributes([KeyValue::new("component", "grpc")])
.start(&tracer);
let cx = Context::current_with_span(span);
let mut client = GreeterClient::connect("http://[::1]:50051").await?;
Expand All @@ -75,10 +75,8 @@ async fn greet() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static
status_code.to_string()
}
};
cx.span().add_event(
"Got response!".to_string(),
vec![KeyValue::new("status", status)],
);
cx.span()
.add_event("Got response!", vec![KeyValue::new("status", status)]);

Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion examples/tracing-http-propagator/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async fn send_request(
.await?;

cx.span().add_event(
"Got response!".to_string(),
"Got response!",
vec![KeyValue::new("status", res.status().to_string())],
);

Expand Down
1 change: 0 additions & 1 deletion opentelemetry-appender-log/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ serde = { workspace = true, optional = true, features = ["std"] }
[features]
logs_level_enabled = ["opentelemetry/logs_level_enabled"]
with-serde = ["log/kv_serde", "serde"]
default = ["logs_level_enabled"]

[dev-dependencies]
opentelemetry_sdk = { path = "../opentelemetry-sdk", features = [ "testing", "logs_level_enabled" ] }
Expand Down
5 changes: 2 additions & 3 deletions opentelemetry-appender-tracing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ log = { workspace = true }
opentelemetry-stdout = { path = "../opentelemetry-stdout", features = ["logs"] }
opentelemetry_sdk = { path = "../opentelemetry-sdk", features = ["logs", "testing"] }
tracing-log = "0.2"
async-trait = "0.1"
criterion = "0.5.1"
async-trait = { workspace = true }
criterion = { workspace = true }

[features]
experimental_metadata_attributes = ["dep:tracing-log"]
logs_level_enabled = ["opentelemetry/logs_level_enabled"]
default = ["logs_level_enabled"]


[[bench]]
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ hex = { version = "0.4.3", optional = true }
tonic-build = { workspace = true }
prost-build = { workspace = true }
tempfile = "3.3.0"
serde_json = "1.0"
serde_json = { workspace = true }
2 changes: 1 addition & 1 deletion opentelemetry-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[dev-dependencies]
criterion = { version = "0.5", features = ["html_reports"] }
criterion = { workspace = true, features = ["html_reports"] }
temp-env = { workspace = true }

[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ otel_unstable = []

[dev-dependencies]
opentelemetry_sdk = { path = "../opentelemetry-sdk", features = ["logs_level_enabled"]} # for documentation tests
criterion = { version = "0.3" }
criterion = { workspace = true }
rand = { workspace = true }

[[bench]]
Expand Down

0 comments on commit 4c9acdf

Please sign in to comment.