1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-04-22 01:46:50 +02:00

10 Commits

Author SHA1 Message Date
Riley
7933926b0b
Add opentelemetry 0.20 (#111)
* Add opentelemetry 0.20

* Update github workflow

* clippy nit
2023-08-05 17:59:20 +08:00
DW
d726662f80
Update to latest actix-web (#59) 2021-12-01 09:48:51 +00: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
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
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
a83919a719 Fix linter errors. 2021-08-13 11:02:32 +01:00
Rob Ede
72aa916fe7
reduce imports (#27) 2021-07-13 07:19:41 +01:00
Luca Palmieri
737a718467 Properly extract errors coming from handlers. 2021-04-28 22:19:32 +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