Skip to content

chore(tracing): move tracing-actix-web examples into workspace - #1423

Merged
robjtede merged 3 commits into
mainfrom
move-tracing-examples
Sep 25, 2026
Merged

robjtede merged 3 commits into
mainfrom
move-tracing-examples

Conversation

@robjtede

@robjtede robjtede commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Move the custom root span, OpenTelemetry, and request ID response header examples from actix-extras/tracing-actix-web/examples into tracing/.

Register all three examples as workspace members, use workspace package settings and Tokio local runtime entry points, and update the run instructions. Use tracing-actix-web 0.7.22 as the minimum version with OpenTelemetry 0.32 support. Expose the OTLP port in the custom root span example's Jaeger command. The existing Mainmatter workshop is unchanged.

The request ID example uses middleware::from_fn and examples_common::init_standard_logger(). The telemetry examples retain their custom subscribers for JSON console logs and OTLP export. They shut down their exporters with spawn_blocking so the local runtime can continue to drive I/O.

Validation:

  • cargo clippy -p tracing-custom-root-span -p tracing-opentelemetry-example -p tracing-request-id-response-header --all-targets --all-features --offline
  • cargo build -p tracing-custom-root-span -p tracing-opentelemetry-example -p tracing-request-id-response-header --offline
  • HTTP smoke checks for all three new examples, including successful shutdown. Verified distinct request IDs, a request ID on a 404 response, and the custom greeting route.
  • Scoped nightly rustfmt, Taplo format/lint, and Prettier checks passed.

Trace export to a running collector was not tested.

Companion source cleanup: actix/actix-extras#839. Merge this PR first so the updated documentation links resolve.

@robjtede
robjtede added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit e6d93f1 Sep 25, 2026
9 checks passed
@robjtede
robjtede deleted the move-tracing-examples branch September 25, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant