From de84e7b2752c7f2f901e4f0f24ad2c7c915c3183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Thallis?= Date: Thu, 22 Feb 2024 23:18:29 -0300 Subject: [PATCH] Remove unnecessary default for Oban (#264) These fields are required in `Oban.Job` --- README.md | 2 +- .../lib/demo_web/templates/page/index.html.heex | 2 +- .../opentelemetry_oban/lib/opentelemetry_oban.ex | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d83693f..983523b 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ We'd love your help!. Use tags [up-for-grabs][up-for-grabs-issues] and - For more information on OpenTelemetry, see [opentelemetry.io](https://opentelemetry.io). - For conventions used in OpenTelemetry traces, see the following [readme](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/README.md). -- For help or feedback on this project, join us in [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-erlang-contrib/discussions), `#otel-erlang-elixir` channel in the [CNCF slack](https://slack.cncf.io/), and `#opentelemetry` channel in the [Elixir Lang slack](https://elixir-slackin.herokuapp.com/) +- For help or feedback on this project, join us in [GitHub Discussions](https://github.com/open-telemetry/opentelemetry-erlang-contrib/discussions), `#otel-erlang-elixir` channel in the [CNCF slack](https://slack.cncf.io/), and `#opentelemetry` channel in the [Elixir Lang slack](https://elixir-slack.community/) - Erlang SIG [community page](https://github.com/open-telemetry/community#special-interest-groups) ## License diff --git a/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex b/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex index f844bd8..d10b3d2 100644 --- a/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex +++ b/examples/basic_phoenix_ecto/lib/demo_web/templates/page/index.html.heex @@ -31,7 +31,7 @@ Twitter @elixirphoenix
  • - Elixir on Slack + Elixir on Slack
  • Elixir on Discord diff --git a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex index 617062b..7a4a41a 100644 --- a/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex +++ b/instrumentation/opentelemetry_oban/lib/opentelemetry_oban.ex @@ -53,7 +53,7 @@ defmodule OpentelemetryOban do def insert(name \\ Oban, %Changeset{} = changeset) do attributes = attributes_before_insert(changeset) - worker = Changeset.get_field(changeset, :worker, "unknown") + worker = Changeset.get_field(changeset, :worker) OpenTelemetry.Tracer.with_span "#{worker} send", attributes: attributes, kind: :producer do changeset = add_tracing_information_to_meta(changeset) @@ -75,7 +75,7 @@ defmodule OpentelemetryOban do def insert!(name \\ Oban, %Changeset{} = changeset) do attributes = attributes_before_insert(changeset) - worker = Changeset.get_field(changeset, :worker, "unknown") + worker = Changeset.get_field(changeset, :worker) OpenTelemetry.Tracer.with_span "#{worker} send", attributes: attributes, kind: :producer do changeset = add_tracing_information_to_meta(changeset) @@ -126,8 +126,8 @@ defmodule OpentelemetryOban do end defp attributes_before_insert(changeset) do - queue = Changeset.get_field(changeset, :queue, "unknown") - worker = Changeset.get_field(changeset, :worker, "unknown") + queue = Changeset.get_field(changeset, :queue) + worker = Changeset.get_field(changeset, :worker) %{ Trace.messaging_system() => :oban,