Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiamsantos/spandex_redix
Tracing integration between redix and spandex
https://github.com/thiamsantos/spandex_redix
Last synced: 4 days ago
JSON representation
Tracing integration between redix and spandex
- Host: GitHub
- URL: https://github.com/thiamsantos/spandex_redix
- Owner: thiamsantos
- License: other
- Created: 2020-02-15T23:13:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T23:14:23.000Z (almost 5 years ago)
- Last Synced: 2024-10-12T16:31:59.926Z (about 1 month ago)
- Language: Elixir
- Homepage: https://hex.pm/packages/spandex_redix
- Size: 4.88 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SpandexRedix
[![Build Status](https://github.com/thiamsantos/spandex_redix/workflows/CI/badge.svg)](https://github.com/thiamsantos/spandex_redix/actions)
Tracing integration between [redix](https://hex.pm/packages/redix) and [spandex](https://hex.pm/packages/spandex).
It leverages telemetry to get the [redix](https://hex.pm/packages/redix) events and trace them with [spandex](https://hex.pm/packages/spandex).## Installation
The package can be installed
by adding `spandex_redix` to your list of dependencies in `mix.exs`:```elixir
def deps do
[
{:spandex_redix, "~> 0.1.0"}
]
end
```## Usage
Configure the correct tracer to be used:
```elixir
config :spandex_redix
service: :redix, # Optional
tracer: MyApp.Tracer, # Required
```Attach the telemetry handler:
```elixir
# in application.ex
:telemetry.attach_many(
"spandex-redix-tracer",
[
[:redix, :pipeline],
[:redix, :pipeline, :error]
],
&SpandexRedix.handle_event/4,
nil
)
```The docs can
be found at [https://hexdocs.pm/spandex_redix](https://hexdocs.pm/spandex_redix).## License
[Apache License, Version 2.0](LICENSE) © [Thiago Santos](https://github.com/thiamsantos)