   defmacro with_span(name, start_opts \\ quote(do: %{}), do: block) do
     quote do
       :otel_tracer.with_span(
-        :opentelemetry.get_tracer(__MODULE__),
+        :opentelemetry.get_application_tracer(__MODULE__),
         unquote(name),
         Map.new(unquote(start_opts)),
         fn _ -> unquote(block) end

    quote bind_quoted: [ctx: ctx, name: name, start_opts: opts] do
      :otel_tracer.start_span(
        ctx,
        :opentelemetry.get_tracer(__MODULE__),
        name,
        Map.new(start_opts)
      )

    quote do
      :otel_tracer.with_span(
        unquote(ctx),
        :opentelemetry.get_application_tracer(__MODULE__),
        unquote(name),
        Map.new(unquote(start_opts)),
        fn _ -> unquote(block) end
