Generate response time histogram and report it to datadog for visualization
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
lib
test
.credo.exs
.gitignore
LICENSE.md
Makefile
README.md
mix.exs
mix.lock
version

README.md

ex_datadog_plug

A plug for logging response time in datadog. To use it, just plug it into the desired module:

# ...
plug Plug.RequestId
plug ExDatadog.Plug, prefix: "your-service", method: true, query: []
# ...

Options

  • :prefix - the prefix you want to put for this stat. Default is plug.
  • :method - a boolean value to include the method in the tag list. Default is false.
  • :query - a list of strings to include specific query string in the tag list. [] will generate all query params as tags. Default is nil (do not generate tag for query string)

Installation

ex_datadog_plug is available in hex, it can be installed by adding ex_datadog_plug to your list of dependencies in mix.exs:

def deps do
  [{:ex_datadog_plug, "~> 0.1.0"}]
end

Full documentation can be found at https://hexdocs.pm/ex_datadog_plug.