class Hub implements HubInterface

Constants

CONTEXT_STACK_KEY

CONTEXT_LAST_EVENT_ID_KEY

CONTEXT_REQUEST_COROUTINE_ID_KEY

Methods

__construct(ClientInterface|null $client = null, Scope|null $scope = null)

No description

ClientInterface|null
getClient()

No description

void
bindClient(ClientInterface $client)

Bind a new client to the hub.

EventId|null
getLastEventId()

No description

Scope
pushScope()

No description

bool
popScope()

No description

EventId|null
captureMessage(string $message, Severity|null $level = null, EventHint|null $hint = null)

No description

EventId|null
captureException(Throwable $exception, EventHint|null $hint = null)

No description

EventId|null
captureEvent(Event $event, EventHint|null $hint = null)

No description

EventId|null
captureLastError(EventHint|null $hint = null)

No description

bool
addBreadcrumb(Breadcrumb $breadcrumb)

No description

void
configureScope(callable $callback)

No description

Transaction
startTransaction(TransactionContext $context, array $customSamplingContext = [])

No description

Transaction|null
getTransaction()

No description

HubInterface
setSpan(Span|null $span)

No description

Span|null
getSpan()

No description

withScope(callable $callback)

No description

string|null
captureCheckIn(string $slug, CheckInStatus $status, null|float|int $duration = null, MonitorConfig|null $monitorConfig = null, string|null $checkInId = null)

No description

IntegrationInterface|null
getIntegration(string $className)

No description

Scope
getScope()

No description

Details

at line 38
__construct(ClientInterface|null $client = null, Scope|null $scope = null)

No description

Parameters

ClientInterface|null $client
Scope|null $scope

at line 42
ClientInterface|null getClient()

No description

Return Value

ClientInterface|null

at line 54
void bindClient(ClientInterface $client)

Bind a new client to the hub.

Boot-only. Mutates the shared client on the singleton Hub; per-request use races across coroutines, and existing coroutine layer stacks may already hold the previous client.

Parameters

ClientInterface $client

Return Value

void

at line 59
EventId|null getLastEventId()

No description

Return Value

EventId|null

at line 64
Scope pushScope()

No description

Return Value

Scope

at line 77
bool popScope()

No description

Return Value

bool

at line 90
EventId|null captureMessage(string $message, Severity|null $level = null, EventHint|null $hint = null)

No description

Parameters

string $message
Severity|null $level
EventHint|null $hint

Return Value

EventId|null

at line 104
EventId|null captureException(Throwable $exception, EventHint|null $hint = null)

No description

Parameters

Throwable $exception
EventHint|null $hint

Return Value

EventId|null

at line 118
EventId|null captureEvent(Event $event, EventHint|null $hint = null)

No description

Parameters

Event $event
EventHint|null $hint

Return Value

EventId|null

at line 132
EventId|null captureLastError(EventHint|null $hint = null)

No description

Parameters

EventHint|null $hint

Return Value

EventId|null

at line 143
bool addBreadcrumb(Breadcrumb $breadcrumb)

No description

Parameters

Breadcrumb $breadcrumb

Return Value

bool

at line 169
void configureScope(callable $callback)

No description

Parameters

callable $callback

Return Value

void

at line 178
Transaction startTransaction(TransactionContext $context, array $customSamplingContext = [])

No description

Parameters

TransactionContext $context
array $customSamplingContext

Additional context that will be passed to the {\Sentry\Tracing\SamplingContext}

Return Value

Transaction

at line 321
Transaction|null getTransaction()

No description

Return Value

Transaction|null

at line 326
HubInterface setSpan(Span|null $span)

No description

Parameters

Span|null $span

Return Value

HubInterface

at line 333
Span|null getSpan()

No description

Return Value

Span|null

at line 338
withScope(callable $callback)

No description

Parameters

callable $callback

at line 352
string|null captureCheckIn(string $slug, CheckInStatus $status, null|float|int $duration = null, MonitorConfig|null $monitorConfig = null, string|null $checkInId = null)

No description

Parameters

string $slug
CheckInStatus $status
null|float|int $duration
MonitorConfig|null $monitorConfig
string|null $checkInId

Return Value

string|null

at line 382
IntegrationInterface|null getIntegration(string $className)

No description

Parameters

string $className

Return Value

IntegrationInterface|null

at line 389
protected Scope getScope()

No description

Return Value

Scope