defmodule MetrixWire.MixProject do use Mix.Project @version "0.2.2" @source_url "https://github.com/metrixwire/elixir" def project do [ app: :metrixwire, version: @version, elixir: "~> 1.14", start_permanent: Mix.env() == :prod, description: description(), package: package(), deps: deps(), docs: docs(), name: "MetrixWire", source_url: @source_url ] end # The SDK ships its own OTP application. `mod:` starts MetrixWire.Application on # boot, which brings up the transport GenServer and attaches every :telemetry # handler — so merely adding the dep + setting METRIXWIRE_KEY makes Phoenix # fully automatic with zero code changes ("pasang lalu beres"). def application do [ extra_applications: [:logger, :inets, :ssl], mod: {MetrixWire.Application, []} ] end defp deps do [ # :telemetry is the one true dependency — the whole Elixir ecosystem # (Phoenix, Ecto, Finch, Tesla) emits telemetry, so a single handler set # covers every framework. No HTTP client dependency: the transport uses the # built-in :httpc / :inets. {:telemetry, "~> 1.0"}, {:ex_doc, ">= 0.0.0", only: :dev, runtime: false} ] end defp description do "Zero-config APM SDK for Elixir — Phoenix, Plug, Ecto. Add the dep and set " <> "METRIXWIRE_KEY; every request/query/HTTP call is traced automatically." end defp package do [ name: "metrixwire", licenses: ["MIT"], links: %{"GitHub" => @source_url}, files: ~w(lib mix.exs README.md) ] end defp docs do [ main: "readme", extras: ["README.md"] ] end end