enrichTelemetryCallbacks()
Home > @gooddata/sdk-ui-pluggable-application > enrichTelemetryCallbacks
enrichTelemetryCallbacks() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Wraps host telemetry callbacks so every trackEvent call also reports the module's runtime metadata.
Signature:
export declare function enrichTelemetryCallbacks(callbacks: IPluggableAppTelemetryCallbacks | undefined, metadata: IModuleTelemetryMetadata): IPluggableAppTelemetryCallbacks | undefined;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
callbacks |
IPluggableAppTelemetryCallbacks | undefined | |
|
metadata |
Returns:
IPluggableAppTelemetryCallbacks | undefined
Remarks
The metadata is merged into the event data before the host's own data keys, so an explicit key in the call site's data wins on collision (mirroring how the host merges its common properties). trackPageView and trackTiming are passed through unchanged — they carry no data slot today. Returns undefined when given undefined, so a standalone module (mounted outside the host) stays a no-op.