1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-23 10:53:02 +01:00

57 Commits

Author SHA1 Message Date
LukeMathWalker
306dc85654 Prepare release 2021-12-30 09:29:01 +01:00
Rob Ede
7c2f67fc90
Updated actix-web dependency to 4.0.0-beta.18 (#66) 2021-12-30 09:22:36 +01:00
LukeMathWalker
224d92e7cc Prepare new release 2021-12-28 10:57:49 +01:00
LukeMathWalker
a95320bd50 Update version 2021-12-18 17:48:59 +00:00
ondra05
f0882677fe
Updated actix-web dependency to 4.0.0-beta.15 (#63) 2021-12-18 13:11:52 +00:00
LukeMathWalker
22fa66961c Update versions in docs 2021-12-13 15:46:29 +00:00
Riley
14147286ba
Update to actix-web beta.14 (#61)
* Update to actix-web beta.14

* Fix HeaderMap import
2021-12-13 15:45:34 +00:00
LukeMathWalker
ae7040a54e Prepare 0.5.0-beta.4 release 2021-12-01 09:50:00 +00:00
DW
d726662f80
Update to latest actix-web (#59) 2021-12-01 09:48:51 +00:00
Luca Palmieri
0838f1758f
Update to latest actix-web + improve README clarity around identifiers (#58)
* Update documentation to clarify what identifier should be used for what.

* Update to latest actix-web beta.
2021-11-24 11:02:05 +00:00
LukeMathWalker
a7ca5dab3a Update versions 2021-11-18 20:00:24 +00:00
LukeMathWalker
b811e065cb Breaking release. 2021-10-27 09:51:36 +01:00
Riley
352c274c8d
Update tracing subscriber (#49)
* Update tracing subscriber

* Fix tests

* Update existing opentelemetry_0_16 feature with new subscriber

* Fix compile issue
2021-10-27 09:47:12 +01:00
LukeMathWalker
6f9dcc8930 Prepare release 2021-10-27 09:36:03 +01:00
LukeMathWalker
fbe847eaad Fix clippy lint 2021-10-27 09:35:30 +01:00
markhildreth-deepgram
42e690b907
Fixed opentelemetry feature breaking due to root_span! use (#51)
Fixes https://github.com/LukeMathWalker/tracing-actix-web/issues/50

The `root_span!` macro included some feature flag checks. However, the
`root_span!` macro might end up being used in other crates consuming
`tracing-actix-web`, and those feature flag checks would be copied in
verbatim. The result is that the feature flag checks for things like
`opentelemetry_0_14` would actually check the consuming crates flags
rather than the flags for `tracing-actix-web`.

This commit moves those feature flag checks out of the macro, so they
are always resolved against `tracing-actix-web`.
2021-10-27 09:26:59 +01:00
LukeMathWalker
8d0ab6fcef Prepare release 2021-10-21 09:49:42 +01:00
Russ Weas
cf8622fcf0
Use http response for determining status code on errors (#46)
* Use HTTP responses to determine status code for errors

* Move response.status() call in-line

* Added comment, small refactor
2021-10-21 09:47:48 +01:00
Riley
032b7cd48f
Bump actix-web (#47) 2021-10-21 09:47:27 +01:00
LukeMathWalker
be29e11990 Prepare release 2021-10-10 13:25:19 +01:00
Brian Rogers
331ab70224
Change http.status_code to i32 (#43)
Fixes #42
2021-10-10 13:23:06 +01:00
Riley
e6c90a1729
Hold root span across polls in streamed body (#40)
* Hold root span across polls in streamed body

* Satisfy clippy

* Remove Unpin bound

* Add documentation about Compat middlware

* Don't use fully qualified MessageBody

* Satisfy clippy
2021-10-10 13:20:24 +01:00
LukeMathWalker
a2f2d0d1d6 Merge branch 'main' of github.com:LukeMathWalker/tracing-actix-web into main 2021-09-21 10:34:17 +02:00
LukeMathWalker
5517c39118 Bump version in docs 2021-09-21 10:34:11 +02:00
Riley
e1b272ec4c
Tracing error workaround (#38)
* Allow root_span to wrap the full middlware chain, not just the output future

* Build error string outside of span.record

This is a workaround for https://github.com/tokio-rs/tracing/issues/1565

* Reference issue being worked-around as comment
2021-09-21 10:33:32 +02:00
Riley
f6ccc73151
Allow root_span to wrap the full middlware chain, not just the output future (#37) 2021-09-21 10:32:52 +02:00
Riley
42ede27123
Don't pull in unneeded dependency on futures (#35) 2021-09-14 09:12:20 +02:00
LukeMathWalker
7b510a7f32 Prepare release 2021-09-10 11:18:00 +02:00
Luca Palmieri
050bfe058d
Otel 16 (#33)
* Use matrix to test all versions.

* Add support for OTEL 0.16

* Typo.

* Fail on warnings.

* Inject headers when using OTEL 0.16.

* Fix.
2021-08-30 13:36:15 +02:00
LukeMathWalker
a10427b59c Change version in documentation. 2021-08-13 11:11:58 +01:00
LukeMathWalker
a83919a719 Fix linter errors. 2021-08-13 11:02:32 +01:00
LukeMathWalker
d7ffa0aac8 Run rustfmt on the whole project 2021-08-13 10:59:46 +01:00
LukeMathWalker
159ffcde94 Ensure compilation fails if multiple incompatible OTEL flags are specified. 2021-08-13 10:56:35 +01:00
Nick
431788e4d7
use import alias for otel versions (#29) 2021-08-13 10:48:23 +01:00
Thomas de Zeeuw
2bea16dd27
Implement Debug for RequestId (#31) 2021-08-13 09:57:21 +01:00
LukeMathWalker
cd11f358cd Do not enable opentelemetry by default until they release 1.0. 2021-07-13 09:33:59 +01:00
Kirill Mironov
3068b1213e
feat(otel): add support for opentelemetry @0.15 (#26)
* feat(otel): add support for opentelemetry @0.15

* add otel_15 to macro

* Add missing docs and readme entry for OTEL 0.15
2021-07-13 09:30:40 +01:00
Rob Ede
72aa916fe7
reduce imports (#27) 2021-07-13 07:19:41 +01:00
LukeMathWalker
d5bb73125b Enabled OTEL 0.14 by default. 2021-07-03 18:44:49 +02:00
Brian Rogers
2367e71ff4
Support updated OT 0.14 / tracing-OT 0.13 crate versions (#23)
* Support updated OT 0.14 / tracing-OT 0.12 crate versions

Add support for opentelemetry 0.14 and tracing-opentelemetry 0.13.
Make corresponding changes to the features, docs, and examples.
Due to the use of two different versions of the same packages, some
reorganization had to be done for the internal modules.

Addresses issue #22.

* Re-export versioned set_otel_parent `fn`s for use in macro
2021-07-03 18:33:59 +02:00
LukeMathWalker
a3d4182ce0 Guess who made a bit of a mess releasing the new version... I did! 2021-06-20 20:17:45 +02:00
LukeMathWalker
32529f6dd3 Update README with the right versions. 2021-06-20 20:13:58 +02:00
Luca Palmieri
0034e3bda8
Update to actix-web 4.0.0-beta.7. (#24)
Add two new error types implementing ResponseError, as required, for our extractors.

Add public docs for new errors.

Co-authored-by: LukeMathWalker <rust@lpalmieri.com>
2021-06-20 20:03:48 +02:00
Luca Palmieri
737a718467 Properly extract errors coming from handlers. 2021-04-28 22:19:32 +01:00
Luca Palmieri
e110e6cf8d Add error details. 2021-04-28 21:23:53 +01:00
LukeMathWalker
034ef8d0c9 Fix docs. 2021-04-25 12:44:22 +01:00
Luca Palmieri
1e8949fa0d
Release 0.4.0 beta.1 (#16)
* Add examples links.

* Bump minor version.

* Add note on version.

* Update README.

* Add badges.

* Add license blurb.
2021-04-25 12:32:59 +01:00
Luca Palmieri
7da6ea91ac
Adopt OpenTelemetry's semantic convention (#15)
* 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 <contact@palmieri.com>
2021-04-25 12:19:27 +01:00
Lucas Sunsi
56a0b1aa4c
Add HTTP method to span fields (#12) 2021-03-23 11:13:29 +00:00
Luca Palmieri
466b8a65d2
Update to the latest actix-web beta. (#8)
Co-authored-by: LukeMathWalker <contact@palmieri.com>
2021-02-11 08:57:08 +00:00