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 / trackPageView / trackTiming 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 data argument before the call site's own keys, so an explicit key in data wins on collision (mirroring how the host merges its common properties). This applies to all three methods so module React / SDK versions are stamped on events, page views and timings alike. Returns undefined when given undefined, so a standalone module (mounted outside the host) stays a no-op.