///
import { App, Session } from '@szdziedzic/apple-utils';
import { Analytics, MetadataEvent } from '../../analytics/AnalyticsManager';
export type TelemetryContext = {
app: App;
auth: Partial;
};
/**
* Subscribe the telemetry to the ongoing metadata requests and responses.
* When providing the app and auth info, we can scrub that data from the telemetry.
* Returns an execution ID to group all events of a single run together, and a unsubscribe function.
*/
export declare function subscribeTelemetry(analytics: Analytics, event: MetadataEvent, options: TelemetryContext): {
/** Unsubscribe the telemetry from all apple-utils events */
unsubscribeTelemetry: () => void;
/** The unique id added to all telemetry events from a single execution */
executionId: string;
};
/** Exposed for testing */
export declare function makeDataScrubber({ app, auth }: TelemetryContext): (data: T) => string;