           raise "Exception!"
         catch
           :error, error ->
-            Span.add_error(nil, error, System.stacktrace())
+            Span.add_error(nil, error, __STACKTRACE__)
         end
 
       [return: return]

          raise "Exception!"
        catch
          :error, error ->
            Span.add_error(span, error, System.stacktrace())
        end

      [return: return]

          raise "Exception!"
        catch
          :error, error ->
            Span.add_error(span, error, __STACKTRACE__)
        end

      [return: return]
