# Class TelemetryEvent

Represents a telemetry event that can be use to track events.

##### Index

### Constructors

constructor

### Properties

name

### Methods

stop

## Constructors

### constructor

- new TelemetryEvent(
  name: string,
  _client: TwinfinityTelemetryClient,
  ): TelemetryEvent

  Creates a new instance of TelemetryEvent.

  #### Parameters

  - name: string

    The name of the telemetry event.

  - _client: TwinfinityTelemetryClient

    The telemetry client used to track the event.

  #### Returns TelemetryEvent

## Properties

### `Readonly` name

name: string

The name of the telemetry event.

## Methods

### stop

- stop(customProperties?: ICustomProperties): void

  Stops the telemetry event and tracks it with the specified custom properties. Also adds a duration in ms to the logged event properties.

  #### Parameters

  - `Optional` customProperties: ICustomProperties

    Optional custom properties to be associated with the event.

  #### Returns void