Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update telemetry dependencies #9

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog for Tracing v0.1

## 0.2.0 (2024-08-23)

* Update deps
* Require a specific adapter for phoenix telemetry, can be either `cowboy2` or `bandit`

## 0.1.5 (2024-08-23)

* Add option to handle expected failurs in `ObanTelemetry` by allowing `reportable?/1` to be set in Oban workers
Expand Down
9 changes: 8 additions & 1 deletion lib/tracing.ex
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,12 @@ defmodule Tracing do
def setup_element(:chromic_pdf), do: Tracing.ChromicPDFTelemetry.setup()
def setup_element(:liveview), do: Tracing.LiveviewTelemetry.setup()
def setup_element(:oban), do: Tracing.ObanTelemetry.setup()
def setup_element(:phoenix), do: OpentelemetryPhoenix.setup()

def setup_element({:phoenix, options}) do
if Keyword.get(options, :adapter) == :cowboy2 do
:opentelemetry_cowboy.setup()
end

OpentelemetryPhoenix.setup(options)
end
end
23 changes: 16 additions & 7 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ defmodule Tracing.MixProject do
[
app: :tracing,
name: "Tracing",
version: "0.1.5",
version: "0.2.0",
elixir: "~> 1.16",
docs: docs(),
compilers: Mix.compilers(),
deps: deps(),
description: description(),
Expand Down Expand Up @@ -36,19 +37,27 @@ defmodule Tracing.MixProject do
{:decorator, "~> 1.4"},
{:dialyxir, "~> 1.3", only: [:dev], runtime: false},
{:ex_doc, "~> 0.31", only: :dev, runtime: false},
{:opentelemetry, "~> 1.3.0"},
{:opentelemetry_semantic_conventions, "~> 0.2.0"},
{:opentelemetry_api, "~> 1.2"},
{:opentelemetry, "~> 1.5"},
{:opentelemetry_semantic_conventions, "~> 1.27"},
{:opentelemetry_api, "~> 1.4"},
{:opentelemetry_ecto, "~> 1.1"},
{:opentelemetry_exporter, "~> 1.6"},
{:opentelemetry_phoenix, "~> 1.2"},
{:opentelemetry_telemetry, "~> 1.0.0"},
{:opentelemetry_exporter, "~> 1.8"},
{:opentelemetry_cowboy, "1.0.0-rc.1"},
{:opentelemetry_phoenix, "~> 2.0.0-rc.1"},
{:opentelemetry_telemetry, "~> 1.1"},
{:telemetry, "~> 1.0"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"}
]
end

defp docs do
[
main: "Tracing",
extras: ["README.md"]
]
end

defp description() do
"""
Standardized library for using OpenTelemetry / :telemetry in Elixir applications.
Expand Down
Loading
Loading