2021-10-08 21:38:18 +00:00
|
|
|
defmodule OpentelemetryEcto.MixProject do
|
|
|
|
use Mix.Project
|
|
|
|
|
|
|
|
def project do
|
|
|
|
[
|
|
|
|
app: :opentelemetry_ecto,
|
|
|
|
description: description(),
|
2021-10-14 03:11:26 +00:00
|
|
|
version: "1.0.0-rc.3",
|
2021-10-08 21:38:18 +00:00
|
|
|
elixir: "~> 1.10",
|
|
|
|
start_permanent: Mix.env() == :prod,
|
|
|
|
deps: deps(),
|
|
|
|
aliases: aliases(),
|
|
|
|
elixirc_paths: elixirc_paths(Mix.env()),
|
|
|
|
package: package(),
|
|
|
|
source_url:
|
|
|
|
"https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_ecto"
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp description do
|
|
|
|
"Trace Ecto queries with OpenTelemetry."
|
|
|
|
end
|
|
|
|
|
|
|
|
defp package do
|
|
|
|
[
|
|
|
|
files: ~w(lib .formatter.exs mix.exs README* LICENSE* CHANGELOG*),
|
|
|
|
licenses: ["Apache-2"],
|
|
|
|
links: %{
|
|
|
|
"GitHub" =>
|
|
|
|
"https://github.com/open-telemetry/opentelemetry-erlang-contrib/tree/main/instrumentation/opentelemetry_ecto",
|
|
|
|
"OpenTelemetry Erlang" => "https://github.com/open-telemetry/opentelemetry-erlang",
|
|
|
|
"OpenTelemetry Erlang Contrib" => "https://github.com/open-telemetry/opentelemetry-erlang-contrib",
|
|
|
|
"OpenTelemetry.io" => "https://opentelemetry.io"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def application do
|
|
|
|
[]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp elixirc_paths(:test), do: ["lib", "test/support"]
|
|
|
|
defp elixirc_paths(_), do: ["lib"]
|
|
|
|
|
|
|
|
defp aliases() do
|
|
|
|
[test: ["ecto.drop -q", "ecto.create -q", "ecto.migrate --quiet", "test"]]
|
|
|
|
end
|
|
|
|
|
|
|
|
defp deps do
|
|
|
|
[
|
|
|
|
{:telemetry, "~> 0.4 or ~> 1.0.0"},
|
2021-10-14 03:11:26 +00:00
|
|
|
{:opentelemetry_api, "~> 1.0.0-rc.3"},
|
|
|
|
{:opentelemetry, "~> 1.0.0-rc.3", only: [:dev, :test]},
|
|
|
|
{:opentelemetry_exporter, "~> 1.0.0-rc.3", only: [:dev, :test]},
|
2021-10-08 21:38:18 +00:00
|
|
|
{:ex_doc, "~> 0.25.0", only: [:dev], runtime: false},
|
|
|
|
{:ecto_sql, ">= 3.0.0", only: [:dev, :test]},
|
|
|
|
{:postgrex, ">= 0.15.0", only: [:dev, :test]}
|
|
|
|
]
|
|
|
|
end
|
|
|
|
end
|