TransactionHandle#

new TransactionHandle(transaction, metrics)#

A light representation of a transaction instance, returned by calling API#getTransaction.

Parameters:
NameTypeDescription
transaction
metrics

Methods#

acceptDistributedTraceHeaders(@param, transportType, headers)#

Parsing incoming headers for use in a distributed trace. W3C TraceContext format is preferred over the NewRelic DT format. NewRelic DT format will be used if no traceparent header is found.

Parameters:
NameTypeDescription
@paramstring

[transportType='Unknown'] - The transport type that delivered the trace.

transportType
headersobject

Headers to search for supported formats. Keys must be lowercase.

end(callback)#

End the transaction.

Parameters:
NameTypeDescription
callbackfunction

ignore()#

Mark the transaction to be ignored.

insertDistributedTraceHeaders(headers)#

Inserts distributed trace headers into the provided headers map.

Parameters:
NameTypeDescription
headersobject

isSampled()#

Return whether this Transaction is being sampled