/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ import { BaseTelemetryProperties, type CommonProperties } from "./resources"; /** * @internal */ export interface ITelemetryContextProperties { [BaseTelemetryProperties.tenantId]: string; [BaseTelemetryProperties.documentId]: string; [BaseTelemetryProperties.correlationId]: string; [BaseTelemetryProperties.requestSource]: string; [CommonProperties.serviceName]: string; } /** * @internal */ export declare function isTelemetryContextProperties(props: unknown): props is ITelemetryContextProperties; /** * @internal */ export interface ITelemetryContext { /** * Bind properties to context where `callback()` is executed. * After this, `getProperties()` within `callback` will include `props`. */ bindProperties(props: Partial, callback: () => void): void; /** * Promisified {@link ITelemetryContext.bindProperties}. */ bindPropertiesAsync(props: Partial, callback: () => Promise): Promise; /** * Retrieve contextual properties for telemetry. */ getProperties(): Partial; } export declare class NullTelemetryContext implements ITelemetryContext { getProperties(): Partial; bindProperties(props: Partial, callback: () => void): void; bindPropertiesAsync(props: Partial, callback: () => Promise): Promise; } export declare const getGlobal: () => typeof globalThis; /** * @internal */ export declare const getGlobalTelemetryContext: () => ITelemetryContext; /** * @internal */ export declare const setGlobalTelemetryContext: (telemetryContext: ITelemetryContext) => void; //# sourceMappingURL=telemetryContext.d.ts.map