Liking cljdoc? Tell your friends :D

dots.vscode.telemetry-logger

A telemetry logger which can be used by extensions to log usage and error telementry.

A logger wraps around an {@link TelemetrySender sender} but it guarantees that

  • user settings to disable or tweak telemetry are respected, and that
  • potential sensitive data is removed

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, use {@link env.createTelemetryLogger createTelemetryLogger}.

A telemetry logger which can be used by extensions to log usage and error telementry.

A logger wraps around an {@link TelemetrySender sender} but it guarantees that
- user settings to disable or tweak telemetry are respected, and that
- potential sensitive data is removed

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`, use
{@link env.createTelemetryLogger `createTelemetryLogger`}.
raw docstring

disposecljs

(dispose telemetry-logger)

Dispose this object and free resources.

Returns: void

Dispose this object and free resources.

**Returns:** `void`
sourceraw docstring

errors-enabled?cljs

(errors-enabled? telemetry-logger)

Whether or not error telemetry is enabled for this logger.

Returns: boolean

Whether or not error telemetry is enabled for this logger.

**Returns:** `boolean`
sourceraw docstring

log-errorcljs

(log-error telemetry-logger error)
(log-error telemetry-logger event-name)
(log-error telemetry-logger error data)
(log-error telemetry-logger event-name data)

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. 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.

Parameters:

  • error: Error - The error object which contains the stack trace cleaned of PII
  • event-name: string - The event name to log
  • data: Record<string, any> | undefined - Additional data to log alongside the stack trace

Returns: void

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.
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.

**Parameters:**
- `error`: `Error` - The error object which contains the stack trace cleaned of PII
- `event-name`: `string` - The event name to log
- `data`: `Record<string, any> | undefined` - Additional data to log alongside the stack trace

**Returns:** `void`
sourceraw docstring

log-usagecljs

(log-usage telemetry-logger event-name)
(log-usage telemetry-logger event-name data)

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.

Parameters:

  • event-name: string - The event name to log
  • data: Record<string, any> | undefined - The data to log

Returns: void

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.

**Parameters:**
- `event-name`: `string` - The event name to log
- `data`: `Record<string, any> | undefined` - The data to log

**Returns:** `void`
sourceraw docstring

on-did-change-enable-statescljs

(on-did-change-enable-states telemetry-logger)
(on-did-change-enable-states telemetry-logger listener)
(on-did-change-enable-states telemetry-logger listener this-args)
(on-did-change-enable-states telemetry-logger listener this-args disposables)

An {@link Event } which fires when the enablement state of usage or error telemetry changes.

Parameters:

  • listener: (e: T) => any - The listener function will be called when the event happens.
  • this-args: any - The this-argument which will be used when calling the event listener.
  • disposables: Disposable[] | undefined - An array to which a {@link Disposable } will be added.

Returns: Disposable - A disposable which unsubscribes the event listener.

An {@link Event } which fires when the enablement state of usage or error telemetry changes.

**Parameters:**
- `listener`: `(e: T) => any` - The listener function will be called when the event happens.
- `this-args`: `any` - The `this`-argument which will be used when calling the event listener.
- `disposables`: `Disposable[] | undefined` - An array to which a {@link Disposable } will be added.

**Returns:** `Disposable` - A disposable which unsubscribes the event listener.
sourceraw docstring

usage-enabled?cljs

(usage-enabled? telemetry-logger)

Whether or not usage telemetry is enabled for this logger.

Returns: boolean

Whether or not usage telemetry is enabled for this logger.

**Returns:** `boolean`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close