new TransactionHandle(transaction, metrics)#
A light representation of a transaction instance, returned by calling API#getTransaction
.
Parameters:
Name | Type | Description |
---|---|---|
transaction | ||
metrics |
- Source
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:
Name | Type | Description |
---|---|---|
@param | string | [transportType='Unknown'] - The transport type that delivered the trace. |
transportType | ||
headers | object | Headers to search for supported formats. Keys must be lowercase. |
- Source
end(callback)#
End the transaction.
Parameters:
Name | Type | Description |
---|---|---|
callback | function |
- Source
ignore()#
Mark the transaction to be ignored.
- Source
insertDistributedTraceHeaders(headers)#
Inserts distributed trace headers into the provided headers map.
Parameters:
Name | Type | Description |
---|---|---|
headers | object |
- Source
isSampled()#
Return whether this Transaction is being sampled
- Source