Commit Graph

21 Commits (730c402420c44f1249273322d5d54a4282d46890)

Author SHA1 Message Date
Aitor Fernández 4ce811911b
Add feature flag for deprecated fields (#167)
* Add feature flag for deprecated fields

* revert editor format

* rename flag

* remove unnecessary cfg not

* add comment and publish old and new attributes on request_span macro

* add comment

* update changelog

* Update reqwest-tracing/CHANGELOG.md

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>

* bump version

---------

Co-authored-by: Ethan Brierley <ethanboxx@gmail.com>
2024-07-15 11:53:31 +01:00
Marcus Griep 88dbfe67fb
feat: support opentelemetry 0.23 (#156) 2024-06-03 10:12:56 +01:00
Ethan Brierley d401fc52e7 chore: remove deprecated items (we're making a breaking change anyway) 2024-04-10 09:55:52 +01:00
Christopher Serr 3422e7338c Match stable Semantic Conventions for HTTP Spans
The stable [Semantic Conventions for HTTP
Spans](https://opentelemetry.io/docs/specs/semconv/http/http-spans/) use
different keys than the ones used in this crate. This changes them to
match the keys as defined by the stable specification.
2024-04-10 09:55:52 +01:00
Conrad Ludgate 60212ae451
reqwest 0.12 and other breaking changes (#135)
* update reqwest and http crates

remove task_local_extensions

* remove older opentelemetry packages

* remove more legacy and add new otel

* attempt to make features additive

* features are additive

* delete commented out code

* build split

* docs

* more uniform with reqwest::Client

* remove arcs

* slight optimisation

* update readmes

* update changelog
2024-04-03 18:13:10 +01:00
Robert Collins d44458f402
Support opentelemetry 0.22 (#118) 2024-03-11 17:04:51 +00:00
Julian Tescher 32cc268f07
Add support for `opentelemetry` version `0.21` (#112)
* Add support for `opentelemetry` version `0.21`

* Fix tracer provider import
2024-01-19 11:17:54 +00:00
Conrad Ludgate 7b3493d96c
add opentelementry 0.20 support (#101) 2023-08-23 11:49:15 +01:00
Conrad Ludgate b8b9400858
disable context propagation (#94)
* disable context propagation

* bump version

* removes leftover feature

* fix new test

* add back disabled test
2023-06-20 18:07:12 +01:00
Conrad Ludgate fb7a964ba3
add default_span_name helper function (#93) 2023-05-15 14:55:56 +01:00
Alex Wakefield 3457bf5702
Add `OtelPathNames` for span names (#89)
* feat: add `OtelPathNames` for span names

If this extension is provided span names will be `<method> <path name>`.
These path names will include parameter names rather than IDs or other elements that would increase the cardinality.

* doc: update changelog

* refactor: update `known_paths` to return error

* refactor: return `anyhow::Error` instead

This is as `reqwest_middleware::Error` is more focused on handling a
request.
2023-04-26 15:28:32 +01:00
tl-rodrigo-gryzinski 197f19781d
Make http.url field opt-in (#70) 2022-11-10 13:21:07 +00:00
Robert Collins 07d154cadf
Custom otel names (#65)
* Breaking change(macros): require explicit name for tracing middleware

Closes: #52

This is suggested by the Opentelemetry spec, which requires "Therefore,
HTTP client spans SHOULD be using conservative, low cardinality names
formed from the available parameters of an HTTP request, such as "HTTP
{METHOD_NAME}". Instrumentation MUST NOT default to using URI path as
span name, but MAY provide hooks to allow custom logic to override the
default span name.
"

* Permit customisation of otel span names via OtelName
2022-11-07 13:07:23 +00:00
Robert Collins 920cb5ac16
Capture URL as http.url (#64) 2022-11-07 08:45:58 +00:00
Robert Collins ddd7e12104
Make clear examples are just examples (#63) 2022-11-07 06:51:40 +00:00
birkmose dd877924c4
Opentelemetry 0.18 (#58)
* Support for opentelemetry 0.18

* Updated changelog

* Update CI/CD to test 0.18

* Update documentation to use opentelemetry 0.18

* Update to use 0.18 in libs
2022-09-20 16:07:32 +03:00
Alessandro Zanin 13ca870d20
Allows adding properties to the span (#43)
Provides reqwest-tracing with a trait ReqwestOtelSpanBackend, allowing custom fields/behaviour to be defined.

This is a breaking change as the TracingMiddleware signature now requires you to define a ReqwestOtelSpanBackend to provide it with the desired span behaviour.

Co-authored-by: Alessandro Zanin <ale.zanin90@gmail.com>
Co-authored-by: tl-flavio-barinas <flavio.barinas@truelayer.com>
Co-authored-by: Marco Tormento <tl-marco-tormento@users.noreply.github.com>
2022-06-30 14:54:54 +01:00
Geoffroy Couprie 7b288f582b
update to opentelemetry 0.17 (#29)
* update to opentelemetry 0.17
2022-02-16 17:37:54 +00:00
tl-rodrigo-gryzinski b8645f81eb
Include README in crate doctests and improve documentation (#8)
* chore: Improve docs and include some examples in doctests
2021-09-28 19:26:03 +01:00
Ilmari Vacklin 753b2439fa
Add support for OpenTelemetry 0.16 and tracing-opentelemetry 0.15 (#2)
* add opentelemetry 0.16

* ci: run against otel 0.16

* ci: run jobs against each otel version

* docs: mention opentelemetry_0_16 in README
2021-08-30 13:14:06 +02:00
Rodrigo Gryzinski 7fe55152ec Initial commit 2021-08-13 08:59:58 +01:00