ElasticApm
final class ElasticApm (View source)
Class ElasticApm is a facade (as in Facade design pattern) to the rest of Elastic APM public API.
Constants
VERSION |
|
Methods
Begins a new transaction and sets it as the current transaction.
Begins a new transaction, sets as the current transaction, runs the provided callback as the new transaction and automatically ends the new transaction.
Returns the current transaction.
If there is the current span then it returns the current span.
Begins a new transaction.
Begins a new transaction, runs the provided callback as the new transaction and automatically ends the new transaction.
Advanced API to begin a new transaction
Creates an error based on the given Throwable instance with the current execution segment (if there is one) as the parent.
Creates an error based on the given data with the current execution segment (if there is one) as the parent.
Pauses recording
Resumes recording
Details
static TransactionInterface
beginCurrentTransaction(string $name, string $type, float|null $timestamp = null, string|null $serializedDistTracingData = null)
Begins a new transaction and sets it as the current transaction.
static mixed
captureCurrentTransaction(string $name, string $type, Closure $callback, float|null $timestamp = null, string|null $serializedDistTracingData = null)
Begins a new transaction, sets as the current transaction, runs the provided callback as the new transaction and automatically ends the new transaction.
static TransactionInterface
getCurrentTransaction()
Returns the current transaction.
static ExecutionSegmentInterface
getCurrentExecutionSegment()
If there is the current span then it returns the current span.
Otherwise if there is the current transaction then it returns the current transaction. Otherwise it returns the noop execution segment.
static TransactionInterface
beginTransaction(string $name, string $type, float|null $timestamp = null, string|null $serializedDistTracingData = null)
Begins a new transaction.
static mixed
captureTransaction(string $name, string $type, Closure $callback, float|null $timestamp = null, string|null $serializedDistTracingData = null)
Begins a new transaction, runs the provided callback as the new transaction and automatically ends the new transaction.
static TransactionBuilderInterface
newTransaction(string $name, string $type)
Advanced API to begin a new transaction
static string|null
createErrorFromThrowable(Throwable $throwable)
Creates an error based on the given Throwable instance with the current execution segment (if there is one) as the parent.
static string|null
createCustomError(CustomErrorData $customErrorData)
Creates an error based on the given data with the current execution segment (if there is one) as the parent.
static void
pauseRecording()
Pauses recording
static void
resumeRecording()
Resumes recording
static string
getSerializedCurrentDistributedTracingData()
deprecated
deprecated
No description