UNPKG

@kurrent/opentelemetry

Version:

KurrentDB NodeJS Client SDK interceptors for tracing with OpenTelemetry

17 lines (16 loc) 765 B
import { type Credentials, type EventData, type JSONEventData } from "@kurrent/kurrentdb-client"; export declare function hasConvertGrpcEventMethod(obj: any): obj is { convertGrpcEvent: Function; }; export declare function isJSONEventData(event: EventData): event is JSONEventData; export type AuthKind = "basic" | "bearer" | "provider"; export type AuthContext = { username?: string; kind?: AuthKind; }; /** * Derive the auth-related span attributes from the per-call credentials and * whether a {@link CredentialsProvider} is configured. Narrows the credential * shape once so `username` is only ever set alongside `kind: "basic"`. */ export declare const describeAuth: (credentials: Credentials | undefined, hasProvider: boolean) => AuthContext;