@dynatrace/opentelemetry-core
Version:
Dynatrace OpenTelemetry core package
24 lines • 821 B
TypeScript
import { Span } from "@opentelemetry/api";
/**
* Stripped down version of NodeJS.CallSite holding only the part we need/use.
*/
export interface CallSite {
getTypeName(): string | null;
getFunctionName(): string | null;
getFileName(): string | null;
getLineNumber(): number | null;
}
/**
* Add attributes for an error to span.
* This will overwrite any exiting exception attributes.
* @param span The span to add the error attributes
* @param error The error to add
*/
export declare function addErrorAttributes(span: Span, error: unknown): void;
/**
* Returns an array of callsites of the stack of the given error object
* @param error The error object
* @returns an Array of callsites
*/
export declare function getCallSites(error: Error): CallSite[];
//# sourceMappingURL=ErrorUtils.d.ts.map