From 446a2d29607e822ec1bdf044a274004bbd4ba206 Mon Sep 17 00:00:00 2001 From: Bryan Naegele Date: Tue, 24 Sep 2024 11:14:10 -0600 Subject: [PATCH] Elixir refs --- apps/opentelemetry_api/lib/open_telemetry/span.ex | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/opentelemetry_api/lib/open_telemetry/span.ex b/apps/opentelemetry_api/lib/open_telemetry/span.ex index 15d4abec..59bce947 100644 --- a/apps/opentelemetry_api/lib/open_telemetry/span.ex +++ b/apps/opentelemetry_api/lib/open_telemetry/span.ex @@ -29,8 +29,6 @@ defmodule OpenTelemetry.Span do - A Status (`t:OpenTelemetry.status/0`) """ - require OpenTelemetry.SemanticConventions.Trace - @type start_opts() :: :otel_span.start_opts() @type start_config() :: :otel_span.start_config() @@ -140,10 +138,9 @@ defmodule OpenTelemetry.Span do exception_type = to_string(exception.__struct__) exception_attributes = [ - {OpenTelemetry.SemanticConventions.Trace.exception_type(), exception_type}, - {OpenTelemetry.SemanticConventions.Trace.exception_message(), Exception.message(exception)}, - {OpenTelemetry.SemanticConventions.Trace.exception_stacktrace(), - Exception.format_stacktrace(trace)} + {:"exception.type", exception_type}, + {:"exception.message", Exception.message(exception)}, + {:"exception.stacktrace", Exception.format_stacktrace(trace)} ] add_event(span_ctx, :exception, exception_attributes ++ attributes)