@microsoft/teams.apps
Version:
<p> <a href="https://www.npmjs.com/package/@microsoft/teams.apps" target="_blank"> <img src="https://img.shields.io/npm/v/@microsoft/teams.apps/latest" /> </a> <a href="https://www.npmjs.com/package/@microsoft/teams.apps?activeTab=code
14 lines (13 loc) • 777 B
TypeScript
import type { Span } from '@opentelemetry/api';
/** @internal Mutable attributes collected while tracing an OAuth operation. */
export type OAuthTelemetryState = {
result?: string;
responseStatus?: number;
callbackInvoked?: boolean;
failureCode?: string;
errorType?: string;
};
/** @internal Traces one OAuth lifecycle operation and records its metrics. */
export declare function traceOAuthOperation<T>(spanName: string, connectionName: string, operation: string, execute: (span: Span, telemetry: OAuthTelemetryState) => Promise<T>): Promise<T>;
/** @internal Adds an unexpected exception to the current OAuth span. */
export declare function recordUnexpectedOAuthError(span: Span, telemetry: OAuthTelemetryState, error: unknown, errorType: string): void;