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

remove opentelemetry sdk from dependencies #142

Merged
merged 2 commits into from
Jan 5, 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
1 change: 1 addition & 0 deletions lib/open_telemetry_decorator/attributes_v2.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ defmodule OpenTelemetryDecorator.AttributesV2 do
|> prefix_name()
end

# The error attribute is meaningful in the context of the span, so we don't want to prefix it
defp prefix_name(:error), do: :error
defp prefix_name("error"), do: :error

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule OpenTelemetryDecorator.MixProject do
{:excoveralls, "~> 0.18.0", only: :test, runtime: false},
{:opentelemetry_exporter, "~> 1.4", only: :test},
{:opentelemetry_api, "~> 1.2"},
{:opentelemetry, "~> 1.3", only: :test}
{:opentelemetry, "~> 1.3", only: :test, runtime: false}
]
end

Expand Down
3 changes: 2 additions & 1 deletion test/open_telemetry_decorator/attributes_v2_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ defmodule OpenTelemetryDecorator.AttributesV2Test do

test "doesn't modify keys without underscores" do
attrs = Attributes.get([_id: 1, name: "asd"], [:_id, :name])
assert attrs == [id: 1, name: "asd"]
assert Keyword.get(attrs, :id) == 1
assert Keyword.get(attrs, :name) == "asd"
end
end

Expand Down
Loading