Class: GraphQL::Tracing::SentryTrace::SentryMonitor::Event

Inherits:
MonitorTrace::Monitor::Event show all
Defined in:
lib/graphql/tracing/sentry_trace.rb

Instance Attribute Summary

Attributes inherited from MonitorTrace::Monitor::Event

#keyword, #object

Instance Method Summary collapse

Methods inherited from MonitorTrace::Monitor::Event

#initialize

Constructor Details

This class inherits a constructor from GraphQL::Tracing::MonitorTrace::Monitor::Event

Instance Method Details

#finishObject



74
75
76
# File 'lib/graphql/tracing/sentry_trace.rb', line 74

def finish
  @span&.finish
end

#startObject



66
67
68
69
70
71
72
# File 'lib/graphql/tracing/sentry_trace.rb', line 66

def start
  if Sentry.initialized?
    @span = Sentry.get_current_scope.get_span
    span_name = @monitor.name_for(@keyword, @object)
    @span.start_child(op: span_name)
  end
end