Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream tracing-actix-web into actix-extras #468

Open
wants to merge 171 commits into
base: master
Choose a base branch
from

Conversation

LukeMathWalker
Copy link
Contributor

@LukeMathWalker LukeMathWalker commented Sep 29, 2024

I tried to preserve the git history to give proper attribution to historical contributors to tracing-actix-web.
I've had to do some adjustments to your CI setup to account for tracing-actix-web's mutually exclusive features.

Luca Palmieri and others added 30 commits September 27, 2020 16:27
* Make request ID extractable in request handlers

* Remove unnecessary clone

* Implement `Display`, `Deref` and `Into` for RequestId

* Derive `Copy` for `RequestId` since `Uuid` is `Copy`

* Document `RequestId`

* Clarify, when the ID is logged

Co-authored-by: Valentin Brandl <[email protected]>
* Add http.route.

* Align all fields with OpenTelemetry's semantic conventions.

* Add span kind.

* Emit event for errors.
Add OTEL status code.

* Create otel.status_code field as empty.

* Fix errors.

* Add (feature-gated) support for OpenTelemetry span propagation.

* Capture the trace id as an attribute on the span.

* Change message.

* Log the newly-generated trace id if there is no parent context.

* Define a root_span macro as a stepping stone to allow crate users to add their own fields to the root span.

* Add comments.

* mut is no longer necessary.

* Allow users to customise generation of the root span. Split recording fields on span end from emission of log record. Make log record on error optional via feature flag.

* Provide constructor + default implementation.

* Explode into multiple modules.
Fix various paths/private imports in root_span.

* Rename module to root_span_macro.

* Add a new extractor to retrieve the root span.

* Document crate.

* Docs!

* Add section on OTEL.

* Mention actix-web-opentelemetry.

* Add OpenTelemetry example.

* Improve readme.

* Add custom root span example.

Co-authored-by: LukeMathWalker <[email protected]>
* Add examples links.

* Bump minor version.

* Add note on version.

* Update README.

* Add badges.

* Add license blurb.
asonix and others added 24 commits May 24, 2023 08:56
* Add request-id header example

* Apply cargo fmt
* Add opentelemetry 0.20

* Update github workflow

* clippy nit
* feat(request_id): add support for UUID v7 in `RequestId`

feature flag `uuid_v7` is introduced which inturn enables `v7` feature flag in the `uuid` dependency
Support documentation is added in `README.md`, `src/lib.rs` and `src/request_id.rs`

This feature only works if this crate or any crate dependent on this crate has enabled the compile time configuration flag provided to the rust compiler. `RUSTFLAGS="--cfg uuid_unstable"`.

* chore: add github action to test UUID v7 feature flag

* chore: add the uuid_unstable cfg in the request id impl

* chore: add compiler_error for undesired state in configuration flags

* chore: move the compiler error in request_id module

* chore: fix formatting

* fix(action): fix github action for uuid_v7 with RUSTDOCFLAGS
* `#[cfg(any)] awesomely accepts trailing commas

* use const assert instead of feature matrix

* Update Cargo.toml

* add Opentelemetry 0.21 support

* use the `mutually_exclusive_features` crate macro

* update README.md
* Support otel 0.22

* Update Cargo.toml

* Fix examples

* revert needed spaces at EOLs
* Support otel 0.24

* fix the otel example

* Fix examples and last bits

* Update examples/custom-root-span/src/main.rs

* Update examples/opentelemetry/src/main.rs

---------

Co-authored-by: Luca Palmieri <[email protected]>
@LukeMathWalker LukeMathWalker force-pushed the tracing-actix-web branch 2 times, most recently from 2750ee8 to f0669d2 Compare September 29, 2024 09:00
@LukeMathWalker
Copy link
Contributor Author

LukeMathWalker commented Sep 29, 2024

There's a few failing jobs:

  • All the MSRV ones fail because tracing-actix-web's examples needs Rust 1.80 because of LazyLock
  • Public API diff fails because there's no tracing-actix-web in main, as far as I can see

Let me know how you want to move forward on the first one.

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.