class ClassificationIntegration extends Feature

internal  
 

Constants

private FEATURE_KEY

private FEATURE_KEY_EVALUATE

Methods

__construct(Container $container)

Create a new feature instance.

from  Feature
bool
isApplicable()

Determine whether classification tracing is enabled and available.

void
register()

Register the feature in the environment.

from  Feature
void
onBoot()

Register classification lifecycle listeners.

void
onBootInactive()

Set up the feature in the environment in an inactive state (when no DSN was set).

from  Feature
void
boot()

Initialize the feature.

from  Feature
void
bootInactive()

Initialize the feature in an inactive state (when no DSN was set).

from  Feature
array
getUserConfig()

Retrieve the user configuration.

from  Feature
bool
shouldSendDefaultPii()

Determine if default PII should be sent.

from  Feature
bool
shouldCollectGenAiInputs()

Determine whether AI inputs may be collected.

from  Feature
bool
shouldCollectGenAiOutputs()

Determine whether AI outputs may be collected.

from  Feature
bool
isTracingFeatureEnabled(string $feature, bool $default = true)

Indicate if the given feature is enabled for tracing.

from  Feature
bool
isBreadcrumbFeatureEnabled(string $feature, bool $default = true)

Indicate if the given feature is enabled for breadcrumbs.

from  Feature
bool
canRecordSpans()

Determine if the active SDK client can record spans.

from  Feature
bool
canRecordBreadcrumbs()

Determine if the active SDK client can record breadcrumbs.

from  Feature
void
handleClassifyingForTracing(Classifying $event)

Start a classification span under the current sampled scope.

void
handleClassifiedForTracing(Classified $event)

Record classification answers and finish the owned span.

void
handleClassificationFailedForTracing(ClassificationFailed $event)

Close the exact failed classification attempt before failover or rethrowing.

Details

in Feature at line 35
__construct(Container $container)

Create a new feature instance.

Parameters

Container $container

at line 30
bool isApplicable()

Determine whether classification tracing is enabled and available.

Return Value

bool

in Feature at line 48
void register()

Register the feature in the environment.

Return Value

void

at line 40
void onBoot()

Register classification lifecycle listeners.

Return Value

void

in Feature at line 64
void onBootInactive()

Set up the feature in the environment in an inactive state (when no DSN was set).

Return Value

void

in Feature at line 71
void boot()

Initialize the feature.

Return Value

void

in Feature at line 81
void bootInactive()

Initialize the feature in an inactive state (when no DSN was set).

Return Value

void

in Feature at line 91
protected array getUserConfig()

Retrieve the user configuration.

Return Value

array

in Feature at line 99
protected bool shouldSendDefaultPii()

Determine if default PII should be sent.

Return Value

bool

in Feature at line 113
protected bool shouldCollectGenAiInputs()

Determine whether AI inputs may be collected.

Return Value

bool

in Feature at line 121
protected bool shouldCollectGenAiOutputs()

Determine whether AI outputs may be collected.

Return Value

bool

in Feature at line 146
protected bool isTracingFeatureEnabled(string $feature, bool $default = true)

Indicate if the given feature is enabled for tracing.

Parameters

string $feature
bool $default

Return Value

bool

in Feature at line 159
protected bool isBreadcrumbFeatureEnabled(string $feature, bool $default = true)

Indicate if the given feature is enabled for breadcrumbs.

Parameters

string $feature
bool $default

Return Value

bool

in Feature at line 182
protected bool canRecordSpans()

Determine if the active SDK client can record spans.

Return Value

bool

in Feature at line 196
protected bool canRecordBreadcrumbs()

Determine if the active SDK client can record breadcrumbs.

Return Value

bool

at line 61
void handleClassifyingForTracing(Classifying $event)

Start a classification span under the current sampled scope.

Parameters

Classifying $event

Return Value

void

at line 101
void handleClassifiedForTracing(Classified $event)

Record classification answers and finish the owned span.

Parameters

Classified $event

Return Value

void

at line 125
void handleClassificationFailedForTracing(ClassificationFailed $event)

Close the exact failed classification attempt before failover or rethrowing.

Parameters

ClassificationFailed $event

Return Value

void