# Tesla.Middleware.Tapper
[](https://travis-ci.org/salemove/elixir-tesla_middleware_tapper)
[](https://hex.pm/packages/tesla_middleware_tapper)
[](http://hexdocs.pm/tesla_middleware_tapper)
[https://github.com/Financial-Times/tapper](Tapper) distributed request tracing integration for Tesla.
## Installation
The package can be installed by adding `tesla_middleware_tapper` to your list
of dependencies in `mix.exs`:
```elixir
def deps do
[
{:tesla_middleware_tapper, "~> 0.1.0"}
]
end
```
Documentation can be found at [https://hexdocs.pm/tesla_middleware_tapper](https://hexdocs.pm/tesla_middleware_tapper).
## Usage
First add and configure [https://github.com/Financial-Times/tapper](tapper). After that you only need to add `plug Tesla.Middleware.Tapper` when you wish to trace outgoing http requests.
```elixir
defmodule CartService do
use Tesla
plug Tesla.Middleware.BaseUrl, "https://cart.example.com"
plug Tesla.Middleware.Headers, [{"authorization", "token xyz"}]
plug Tesla.Middleware.JSON
plug Tesla.Middleware.Tapper
def fetch_items() do
get("/items")
end
end
```
## License
MIT License, Copyright (c) 2018 SaleMove