Readonly
isWhether or not error telemetry is enabled for this logger.
Readonly
isWhether or not usage telemetry is enabled for this logger.
Readonly
onAn Event which fires when the enablement state of usage or error telemetry changes.
Log an error event.
After completing cleaning, telemetry setting checks, and data mix-in calls TelemetrySender.sendEventData
to log the event. Differs from logUsage
in that it will log the event if the telemetry setting is Error+.
Automatically supports echoing to extension telemetry output channel.
The event name to log
Optional
data: Record<string, any>The data to log
Log an error event.
Calls TelemetrySender.sendErrorData
. Does cleaning, telemetry checks, and data mix-in.
Automatically supports echoing to extension telemetry output channel.
Will also automatically log any exceptions thrown within the extension host process.
The error object which contains the stack trace cleaned of PII
Optional
data: Record<string, any>Additional data to log alongside the stack trace
Log a usage event.
After completing cleaning, telemetry setting checks, and data mix-in calls TelemetrySender.sendEventData
to log the event.
Automatically supports echoing to extension telemetry output channel.
The event name to log
Optional
data: Record<string, any>The data to log
A telemetry logger which can be used by extensions to log usage and error telemetry.
A logger wraps around a sender but it guarantees that
It also enables an "echo UI" that prints whatever data is send and it allows the editor to forward unhandled errors to the respective extensions.
To get an instance of a
TelemetryLogger
, usecreateTelemetryLogger
.