- Breaking changes
tesla_statsd
is now an optional dependency. If you want to use the StatsD integration, then you need to addtesla_statsd
to your application dependencies inmix.exs
and enable it via thestats
configuration field.
-
Breaking changes
- Disabled
StatsD
integration by default. It can still be enabled and configured via thestats
configuration field as previously.
- Disabled
-
Enhancements
- All retry attempts are now recorded separately by
Telemetry
andOpenTelemetry
middlewares. - Base URL is now included in the URL provided to
Telemetry
,OpenTelemetry
, andStatsD
middlewares regardless of whether the request was successful or not. Previously was only included on successful requests. - Added support for
PathParams
middleware. The URL with unresolved path parameters is available to observability middlewares viaenv.opts[:req_url]
. - Added
url
field to logger, which includes the full URL of the request. The existingpath
field was changed to include the path of the URL, not the full URL.
- All retry attempts are now recorded separately by
-
Breaking changes
- Stopped support for Elixir 1.12.
-
Enhancements
- Added support for Elixir 1.15 and Erlang 25.3.
- Changed log
warn
calls withwarning
, becausewarn
is deprecated from Elixir 1.15. - Long deprecated
ex_statsd
dependency has been removed.
- Enhancements
- Changes log levels of requests that fail with 5XX from "error" to "warn"
- Enhancements
- Include method, path, status and duration in logger metadata
- Bug fixes
- Fix proxy using Hackney's internal option names
- Fix adapter options not being set when using no proxy
- Enhancements
- Add support for HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables.
- Bug fixes
- Fix log levels of requests that end with
:timeout
or:closed
from "error" to "warn"
- Fix log levels of requests that end with
- Bug fixes
- Reduce log level of closed request from "error" to "warn"
- Enhancements
- Update opentelemetry_tesla dependency to 2.0
- Enhancements
- Replace vendor specific tapper library with vendor neutral OpenTelemetry library.
- Bug fixes
- Reduce log level of a timeout from "error" to "warn"
- Bug fixes
- Fix a case when specific request failure errors were not logged
- Breaking changes
-
Module config is now deep merged with base salemove_http_client config.
This is the same way Elixir Config handles configs.
-
Stats middleware configuration option is now required
When using this version, the module config needs to have stats either specified in the config or set to false. This allows turning off stats in tests, for example.
-
- Bug fixes
-
Fixed error decoding to work correctly with Tesla 1.x
Since release of 1.0, Tesla no longer wraps connection errors into
%Tesla.Error{}
structs.
-
-
Breaking Changes
-
Upgraded Tesla to 1.0
This upgrade brings the following potentially breaking changes:
- Headers are now stored as keyword lists
- Errors are now handled with
{:ok, _}
and{:error, _}
-
-
Enhancements
- Replace Poison with Jason
- Added support for headers in a map
-
Bug fixes
- Fixed logger configuration in LoggerTest
- Enhancement
- Added support for Elixir 1.8+
- Enhancements
- Add Tapper middleware (#9)
- Bug fixes
- Fix ignored log level setting when supplied as range (#8)
- Enhancements
-
Add custom logger middleware instead of Tesla's one (#7)
Standard Tesla logger emits errors for all responses with code 4xx and 5xx. While it's OK to have error messages for 5xx responses, some APIs may return 4xx code in normal situations. For this case configurable log level for certain response codes or code ranges is added.
-
- Enhancements
-
Allow sending
application/x-www-form-urlencoded
requests (#6)Add option to use
json: false
in configuration to send request body asapplication/x-www-form-urlencoded
rather than json.
-
- Enhancements
- Add optional Retry middleware to the default middleware stack (#5)
- Bug fixes
- Fix incorrect typespecs
- Enhancements
- Add support for compile-time configuration
- Initial release