TelemetrySender class
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.
const sender: vscode.TelemetrySender = {...};
const logger = vscode.env.createTelemetryLogger(sender);
// GOOD - uses the logger
logger.logUsage('myEvent', { myData: 'myValue' });
// BAD - uses the sender directly: no data cleansing, ignores user settings, no echoing to the telemetry output channel etc
sender.logEvent('myEvent', { myData: 'myValue' });
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
- @anonymous
Constructors
-
TelemetrySender({void sendEventData(String, [dynamic])?, void sendErrorData(Error, [dynamic])?, FutureOr<
void> flush()?}) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited