EventLogGroup

class EventLogGroup(val id: String, val version: Int, val type: EventLogGroup.Type, description: String, val plugin: PluginSchemeDescriptor? = null)

Represents a group of events used for feature usage statistics.

This class is responsible for registering events within a specific group context.

Best practices:

  • Prefer a bigger group with many (related) event types to many small groups of 1-2 events each

  • Prefer shorter group names; avoid common prefixes (such as "statistics.")

Constructors

Link copied to clipboard
constructor(id: String, version: Int, type: EventLogGroup.Type, description: String, plugin: PluginSchemeDescriptor? = null)

Types

Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
val id: String

The unique identifier for this group of events.

Link copied to clipboard

The plugin id of the event group.

Link copied to clipboard

The type of the event group: COUNTER or STATE.

Link copied to clipboard

The version of the event group. Has to be incremented when changes are made to the group/events/fields.

Functions

Link copied to clipboard
fun registerEvent(eventId: String, description: String): EventId

Registers an event with the specified event ID and description.

fun <T1> registerEvent(eventId: String, eventField1: EventField<T1>, description: String): EventId1<T1>

Registers an event with the specified event ID, a single event field, and a description.

fun <D : FieldListDescription> registerEvent(eventId: String, creator: () -> D, description: String): VarargEventId<D>

Registers an event with the specified event ID, a field list, and a description.

fun <T1, T2> registerEvent(eventId: String, eventField1: EventField<T1>, eventField2: EventField<T2>, description: String): EventId2<T1, T2>

Registers an event with the specified event ID, two event fields, and a description.

fun <T1, T2, T3> registerEvent(eventId: String, eventField1: EventField<T1>, eventField2: EventField<T2>, eventField3: EventField<T3>, description: String): EventId3<T1, T2, T3>

Registers an event with the specified event ID, three event fields, and a description.