Skip to content

Commit

Permalink
feat(deps): update rust crate axum to 0.8 (#197)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] authored Jan 2, 2025
1 parent 389b84b commit 5027201
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ rust-version = "1.80.0"

[workspace.dependencies]
assert2 = "0.3"
axum = { version = "0.7", default-features = false }
axum = { version = "0.8", default-features = false }
http = "^1"
hyper = "1"
insta = { version = "1.40", features = ["yaml", "redactions"] }
Expand Down
4 changes: 2 additions & 2 deletions axum-tracing-opentelemetry/src/middleware/trace_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ mod tests {
let mut fake_env = FakeEnvironment::setup().await;
{
let mut svc = Router::new()
.route("/users/:id", get(|| async { StatusCode::OK }))
.route("/users/{id}", get(|| async { StatusCode::OK }))
.route(
"/status/500",
get(|| async { StatusCode::INTERNAL_SERVER_ERROR }),
Expand All @@ -231,7 +231,7 @@ mod tests {
.nest(
"/nest",
Router::new()
.route("/:nest_id", get(|| async {}))
.route("/{nest_id}", get(|| async {}))
.fallback(|| async { (StatusCode::NOT_FOUND, "inner fallback") }),
)
.fallback(|| async { (StatusCode::NOT_FOUND, "outer fallback") })
Expand Down
7 changes: 5 additions & 2 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ deny = [
skip = [
#"[email protected]",
#{ crate = "[email protected]", reason = "you can specify a reason why it can't be updated/removed" },
"[email protected]", # axum 0.7 use tower 0.5, but hyper still use 0.4
"sync_wrapper", # axum direct and transive dependency use multiple version
"[email protected]", # tonic depend on axum 0.7
"[email protected]", # tonic depend on axum 0.7
"[email protected]", # tonic depend on axum 0.7
"[email protected]", # axum 0.7 use tower 0.5, but hyper still use 0.4
# "sync_wrapper", # axum direct and transive dependency use multiple version
"regex-syntax",
"regex-automata",
"indexmap",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: tracing_events
snapshot_kind: text
---
- fields:
message: new
Expand All @@ -27,11 +28,11 @@ expression: tracing_events
span:
http.request.method: GET
http.response.status_code: 200
http.route: "/users/:id"
http.route: "/users/{id}"
name: HTTP request
network.protocol.version: "1.1"
otel.kind: Server
otel.name: "GET /users/:id"
otel.name: "GET /users/{id}"
server.address: ""
span.type: web
url.path: /users/123
Expand All @@ -40,4 +41,3 @@ expression: tracing_events
spans: []
target: "otel::tracing"
timestamp: "[timestamp]"

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: otel_spans
snapshot_kind: text
---
- trace_id: "[trace_id:lg32]"
span_id: "[span_id:lg16]"
trace_state: ""
parent_span_id: "[span_id:lg16]"
name: "GET /users/:id"
name: "GET /users/{id}"
kind: SPAN_KIND_SERVER
start_time_unix_nano: "[timestamp]"
end_time_unix_nano: "[timestamp]"
Expand All @@ -17,7 +18,7 @@ expression: otel_spans
code.namespace: "Some(AnyValue { value: Some(StringValue(\"tracing_opentelemetry_instrumentation_sdk::http::http_server\")) })"
http.request.method: "Some(AnyValue { value: Some(StringValue(\"GET\")) })"
http.response.status_code: "Some(AnyValue { value: Some(StringValue(\"200\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/:id\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/{id}\")) })"
idle_ns: ignore
network.protocol.version: "Some(AnyValue { value: Some(StringValue(\"1.1\")) })"
server.address: "Some(AnyValue { value: Some(StringValue(\"\")) })"
Expand All @@ -35,4 +36,3 @@ expression: otel_spans
status:
message: ""
code: STATUS_CODE_UNSET

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: tracing_events
snapshot_kind: text
---
- fields:
message: new
Expand All @@ -27,11 +28,11 @@ expression: tracing_events
span:
http.request.method: GET
http.response.status_code: 200
http.route: "/nest/:nest_id"
http.route: "/nest/{nest_id}"
name: HTTP request
network.protocol.version: "1.1"
otel.kind: Server
otel.name: "GET /nest/:nest_id"
otel.name: "GET /nest/{nest_id}"
server.address: ""
span.type: web
url.path: /nest/123
Expand All @@ -40,4 +41,3 @@ expression: tracing_events
spans: []
target: "otel::tracing"
timestamp: "[timestamp]"

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: otel_spans
snapshot_kind: text
---
- trace_id: "[trace_id:lg32]"
span_id: "[span_id:lg16]"
trace_state: ""
parent_span_id: "[span_id:lg0]"
name: "GET /nest/:nest_id"
name: "GET /nest/{nest_id}"
kind: SPAN_KIND_SERVER
start_time_unix_nano: "[timestamp]"
end_time_unix_nano: "[timestamp]"
Expand All @@ -17,7 +18,7 @@ expression: otel_spans
code.namespace: "Some(AnyValue { value: Some(StringValue(\"tracing_opentelemetry_instrumentation_sdk::http::http_server\")) })"
http.request.method: "Some(AnyValue { value: Some(StringValue(\"GET\")) })"
http.response.status_code: "Some(AnyValue { value: Some(StringValue(\"200\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/nest/:nest_id\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/nest/{nest_id}\")) })"
idle_ns: ignore
network.protocol.version: "Some(AnyValue { value: Some(StringValue(\"1.1\")) })"
server.address: "Some(AnyValue { value: Some(StringValue(\"\")) })"
Expand All @@ -35,4 +36,3 @@ expression: otel_spans
status:
message: ""
code: STATUS_CODE_UNSET

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: tracing_events
snapshot_kind: text
---
- fields:
message: new
Expand All @@ -27,11 +28,11 @@ expression: tracing_events
span:
http.request.method: GET
http.response.status_code: 200
http.route: "/users/:id"
http.route: "/users/{id}"
name: HTTP request
network.protocol.version: "1.1"
otel.kind: Server
otel.name: "GET /users/:id"
otel.name: "GET /users/{id}"
server.address: ""
span.type: web
url.path: /users/123
Expand All @@ -40,4 +41,3 @@ expression: tracing_events
spans: []
target: "otel::tracing"
timestamp: "[timestamp]"

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: otel_spans
snapshot_kind: text
---
- trace_id: "[trace_id:lg32]"
span_id: "[span_id:lg16]"
trace_state: ""
parent_span_id: "[span_id:lg0]"
name: "GET /users/:id"
name: "GET /users/{id}"
kind: SPAN_KIND_SERVER
start_time_unix_nano: "[timestamp]"
end_time_unix_nano: "[timestamp]"
Expand All @@ -17,7 +18,7 @@ expression: otel_spans
code.namespace: "Some(AnyValue { value: Some(StringValue(\"tracing_opentelemetry_instrumentation_sdk::http::http_server\")) })"
http.request.method: "Some(AnyValue { value: Some(StringValue(\"GET\")) })"
http.response.status_code: "Some(AnyValue { value: Some(StringValue(\"200\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/:id\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/{id}\")) })"
idle_ns: ignore
network.protocol.version: "Some(AnyValue { value: Some(StringValue(\"1.1\")) })"
server.address: "Some(AnyValue { value: Some(StringValue(\"\")) })"
Expand All @@ -35,4 +36,3 @@ expression: otel_spans
status:
message: ""
code: STATUS_CODE_UNSET

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: tracing_events
snapshot_kind: text
---
- fields:
message: new
Expand All @@ -27,11 +28,11 @@ expression: tracing_events
span:
http.request.method: GET
http.response.status_code: 200
http.route: "/users/:id"
http.route: "/users/{id}"
name: HTTP request
network.protocol.version: "1.1"
otel.kind: Server
otel.name: "GET /users/:id"
otel.name: "GET /users/{id}"
server.address: example.com
span.type: web
url.path: /users/123
Expand All @@ -40,4 +41,3 @@ expression: tracing_events
spans: []
target: "otel::tracing"
timestamp: "[timestamp]"

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: otel_spans
snapshot_kind: text
---
- trace_id: "[trace_id:lg32]"
span_id: "[span_id:lg16]"
trace_state: ""
parent_span_id: "[span_id:lg0]"
name: "GET /users/:id"
name: "GET /users/{id}"
kind: SPAN_KIND_SERVER
start_time_unix_nano: "[timestamp]"
end_time_unix_nano: "[timestamp]"
Expand All @@ -17,7 +18,7 @@ expression: otel_spans
code.namespace: "Some(AnyValue { value: Some(StringValue(\"tracing_opentelemetry_instrumentation_sdk::http::http_server\")) })"
http.request.method: "Some(AnyValue { value: Some(StringValue(\"GET\")) })"
http.response.status_code: "Some(AnyValue { value: Some(StringValue(\"200\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/:id\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/{id}\")) })"
idle_ns: ignore
network.protocol.version: "Some(AnyValue { value: Some(StringValue(\"1.1\")) })"
server.address: "Some(AnyValue { value: Some(StringValue(\"example.com\")) })"
Expand All @@ -35,4 +36,3 @@ expression: otel_spans
status:
message: ""
code: STATUS_CODE_UNSET

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: tracing_events
snapshot_kind: text
---
- fields:
message: new
Expand All @@ -27,11 +28,11 @@ expression: tracing_events
span:
http.request.method: GET
http.response.status_code: 200
http.route: "/users/:id"
http.route: "/users/{id}"
name: HTTP request
network.protocol.version: "1.1"
otel.kind: Server
otel.name: "GET /users/:id"
otel.name: "GET /users/{id}"
server.address: ""
span.type: web
url.path: /users/123
Expand All @@ -40,4 +41,3 @@ expression: tracing_events
spans: []
target: "otel::tracing"
timestamp: "[timestamp]"

Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
source: testing-tracing-opentelemetry/src/lib.rs
expression: otel_spans
snapshot_kind: text
---
- trace_id: "[trace_id:lg32]"
span_id: "[span_id:lg16]"
trace_state: ""
parent_span_id: "[span_id:lg0]"
name: "GET /users/:id"
name: "GET /users/{id}"
kind: SPAN_KIND_SERVER
start_time_unix_nano: "[timestamp]"
end_time_unix_nano: "[timestamp]"
Expand All @@ -17,7 +18,7 @@ expression: otel_spans
code.namespace: "Some(AnyValue { value: Some(StringValue(\"tracing_opentelemetry_instrumentation_sdk::http::http_server\")) })"
http.request.method: "Some(AnyValue { value: Some(StringValue(\"GET\")) })"
http.response.status_code: "Some(AnyValue { value: Some(StringValue(\"200\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/:id\")) })"
http.route: "Some(AnyValue { value: Some(StringValue(\"/users/{id}\")) })"
idle_ns: ignore
network.protocol.version: "Some(AnyValue { value: Some(StringValue(\"1.1\")) })"
server.address: "Some(AnyValue { value: Some(StringValue(\"\")) })"
Expand All @@ -35,4 +36,3 @@ expression: otel_spans
status:
message: ""
code: STATUS_CODE_UNSET

0 comments on commit 5027201

Please sign in to comment.