Starts a new Span and calls the given function passing it the created span as first argument. Additionally the new span gets set in context and this context is activated for the duration of the function call.
function called in the context of the span and receives the newly created span as an argument
Starts a new Span. Start the span without setting it on context.
This method do NOT modify the current Context.
The name of the span
Optional
options: SpanOptionsSpanOptions used for span creation
Optional
context: ContextContext to use to extract parent
Span The newly created span
Starts a new Span and calls the given function passing it the created span as first argument. Additionally, the new span gets set in context and this context is activated for the duration of the function call. The span will be closed after the function has executed. If an exception occurs, it is recorded, the status is set to ERROR and the exception is rethrown.
The name of the span
function called in the context of the span and receives the newly created span as an argument
return value of fn
Starts a new Span and calls the given function passing it the created span as first argument. Additionally, the new span gets set in context and this context is activated for the duration of the function call. The span will be closed after the function has executed. If an exception occurs, it is recorded, the status is set to ERROR and the exception is rethrown.
The name of the span
SugaredSpanOptions used for span creation
function called in the context of the span and receives the newly created span as an argument
return value of fn
Starts a new Span and calls the given function passing it the created span as first argument. Additionally, the new span gets set in context and this context is activated for the duration of the function call. The span will be closed after the function has executed. If an exception occurs, it is recorded, the status is set to ERROR and the exception is rethrown.
The name of the span
SugaredSpanOptions used for span creation
Context to use to extract parent
function called in the context of the span and receives the newly created span as an argument
return value of fn
Starts a new Span and ends it after execution of fn without setting it on context. The span will be closed after the function has executed. If an exception occurs, it is recorded, the status is et to ERROR and rethrown.
This method does NOT modify the current Context.
The name of the span
function called in the context of the span and receives the newly created span as an argument
Span The newly created span
Starts a new Span and ends it after execution of fn without setting it on context. The span will be closed after the function has executed. If an exception occurs, it is recorded, the status is et to ERROR and rethrown.
This method does NOT modify the current Context.
The name of the span
SugaredSpanOptions used for span creation
function called in the context of the span and receives the newly created span as an argument
Span The newly created span
Starts a new Span and ends it after execution of fn without setting it on context. The span will be closed after the function has executed. If an exception occurs, it is recorded, the status is et to ERROR and rethrown.
This method does NOT modify the current Context.
The name of the span
SugaredSpanOptions used for span creation
Context to use to extract parent
function called in the context of the span and receives the newly created span as an argument
Span The newly created span
Starts a new Span and ends it after execution of fn without setting it on context. The span will be closed after the function has executed. If an exception occurs, it is recorded, the status is et to ERROR and rethrown.
This method does NOT modify the current Context.
The name of the span
SugaredSpanOptions used for span creation
Context to use to extract parent
function called in the context of the span and receives the newly created span as an argument
Span The newly created span
Tracer provides an interface for creating Spans.
Since
1.0.0