Interface: TelemetrySender
Defined in: packages/extension-api/src/extension-api.d.ts:4472
The telemetry sender is the contract between a telemetry logger and some telemetry service. Note that extensions must NOT call the methods of their sender directly as the logger provides extra guards and cleaning.
Methods
flush()?
optional
flush():void
|Promise
<void
>
Defined in: packages/extension-api/src/extension-api.d.ts:4495
Optional flush function which will give this sender a chance to send any remaining events as its TelemetryLogger is being disposed
Returns
void
| Promise
<void
>
sendErrorData()
sendErrorData(
error
,data
?):void
Defined in: packages/extension-api/src/extension-api.d.ts:4489
Function to send an error. Used within a TelemetryLogger
Parameters
error
Error
The error being logged
data?
Record
<string
, any
>
Any additional data to be collected with the exception
Returns
void
sendEventData()
sendEventData(
eventName
,data
?):void
Defined in: packages/extension-api/src/extension-api.d.ts:4480
Function to send event data without a stacktrace. Used within a TelemetryLogger
Parameters
eventName
string
The name of the event which you are logging
data?
Record
<string
, any
>
A serializable key value pair that is being logged
Returns
void