Added support for the Telemetry feature. #634
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
This is adds support for the Telemetry feature.
Design decisions and overview of the change.
Note: some of our other programing language SDKs capture things like log messages and other items in the telemetry data as part of an auto instrumentation setup. Trying to do this in PHP would require messing with things that could break logging for end user applications. Since most projects will have some sort of logging built in this could easily be wired to the telemeter to capture debug logs etc.
TelemetryStrategy
truncation strategy has been included. This is not enabled by default but can be added if large telemetry sets are reducing the quality of the stack frame data.Telemeter
instance is statically attached to theRollbar
class so that the telemetry data is preserved on reconfiguration of the SDK.null
orfalse
or callingRollbar::destroy()
will remove the telemeter and all the events in the queue.There are probably more details that are important. Feel free to ask questions in the comments.
New configs
The
telemetry
key is now supported in the configs array. It can have any of the following values:null
orfalse
will disable capturing and reporting of telemetry events.true
or[]
will result in telemetry being enabled with the default settings.'maxTelemetryEvents'
int
Should be the most events that will be retained or reported at any given time. If more events are captured they will be removed in a FIFO order. This defaults to100
.'filter'
null|string
This is a custom filter FQCN for a telemetry filter class that implements theRollbar\Telemetry\TelemetryFilterInterface
interface. See the extensive comments onTelemetryFilterInterface
for implementation details. This defaults tonull
.'includeItemsInTelemetry'
bool
Set totrue
to include errors, logs, and other items captured/reported to the SDK in the telemetry data of subsequent reports. Iffalse
they will not be included. This defaults totrue
.'includeIgnoredItemsInTelemetry'
bool
Set totrue
to include items that have been ignored by the SDK in the telemetry data. This defaults tofalse
.Type of change
Related issues
Checklists
Development
Code review