Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TelemetrySender

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' });

Hierarchy

  • TelemetrySender

Index

Methods

  • sendErrorData(error: Error, data?: Record<string, any>): void
  • sendEventData(eventName: string, data?: Record<string, any>): void
  • Function to send event data without a stacktrace. Used within a TelemetryLogger

    Parameters

    • eventName: string

      The name of the event which you are logging

    • Optional data: Record<string, any>

      A serializable key value pair that is being logged

    Returns void