EventMetadata



Makes it possible to associate debug metadata & categories to a TraceEvent. Typically obtained by a call to Tracer.beginSectionWithMetadata.

Summary

Public functions

abstract Unit
addCallStackEntry(name: String, sourceFile: String?, lineNumber: Int)

Adds call stack frame information to the TraceEvent.

Cmn
abstract Unit

Adds additional categories to the TraceEvent.

Cmn
abstract Unit

Add a Long correlation id to the trace packet.

Cmn
abstract Unit

Adds a String correlation id to the trace packet.

Cmn
abstract Unit
addMetadataEntry(name: String, value: Boolean)

Adds a metadata entry where the type of the value is an Boolean.

Cmn
abstract Unit
addMetadataEntry(name: String, value: Double)

Adds a metadata entry where the type of the value is an Double.

Cmn
abstract Unit
addMetadataEntry(name: String, value: Long)

Adds a metadata entry where the type of the value is an Long.

Cmn
abstract Unit
addMetadataEntry(name: String, value: String)

Adds a metadata entry where the type of the value is an String.

Cmn
abstract Unit

Dispatches the underlying TraceEvent to the TraceSink instance if applicable.

Cmn

Public functions

addCallStackEntry

abstract fun addCallStackEntry(name: String, sourceFile: String?, lineNumber: Int): Unit

Adds call stack frame information to the TraceEvent.

addCategory

abstract fun addCategory(name: String): Unit

Adds additional categories to the TraceEvent.

This is useful when an application is interested in a subset of TraceEvents that belong to well known categories. These are typically small identifiers useful for namespacing TraceEvents.

addCorrelationId

abstract fun addCorrelationId(id: Long): Unit

Add a Long correlation id to the trace packet.

addCorrelationId

abstract fun addCorrelationId(id: String): Unit

Adds a String correlation id to the trace packet.

Consider using the addCorrelationId(Long) variant for performance reasons when possible.

addMetadataEntry

abstract fun addMetadataEntry(name: String, value: Boolean): Unit

Adds a metadata entry where the type of the value is an Boolean.

addMetadataEntry

abstract fun addMetadataEntry(name: String, value: Double): Unit

Adds a metadata entry where the type of the value is an Double.

addMetadataEntry

abstract fun addMetadataEntry(name: String, value: Long): Unit

Adds a metadata entry where the type of the value is an Long.

addMetadataEntry

abstract fun addMetadataEntry(name: String, value: String): Unit

Adds a metadata entry where the type of the value is an String.

dispatchToTraceSink

@DelicateTracingApi
abstract fun dispatchToTraceSink(): Unit

Dispatches the underlying TraceEvent to the TraceSink instance if applicable.