lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb in opentelemetry-instrumentation-rack-0.23.5 vs lib/opentelemetry/instrumentation/rack/middlewares/event_handler.rb in opentelemetry-instrumentation-rack-0.24.0
- old
+ new
@@ -88,10 +88,10 @@
def on_error(request, _, error)
span = OpenTelemetry::Instrumentation::Rack.current_span
return unless span.recording?
span.record_exception(error)
- span.status = OpenTelemetry::Trace::Status.error
+ span.status = OpenTelemetry::Trace::Status.error(error.class.name)
rescue StandardError => e
OpenTelemetry.handle_error(exception: e)
end
# Finishes the span making it eligible to be exported and cleans up existing contexts