@sentry/node
Version:
Official Sentry SDK for Node.js
30 lines (29 loc) • 984 B
TypeScript
/// <reference types="node" />
import { readFile, readdir } from 'fs';
import * as os from 'os';
import { DeviceContext, Event, Integration, IntegrationClass } from '@sentry/types';
export declare const readFileAsync: typeof readFile.__promisify__;
export declare const readDirAsync: typeof readdir.__promisify__;
interface DeviceContextOptions {
cpu?: boolean;
memory?: boolean;
}
/** Add node modules / packages to the event */
export declare const Context: IntegrationClass<Integration & {
processEvent: (event: Event) => Promise<Event>;
}> & (new (options?: {
app?: boolean;
os?: boolean;
device?: {
cpu?: boolean;
memory?: boolean;
} | boolean;
culture?: boolean;
cloudResource?: boolean;
}) => Integration);
/**
* Gets device information from os
*/
export declare function getDeviceContext(deviceOpt: DeviceContextOptions | true): DeviceContext;
export {};
//# sourceMappingURL=context.d.ts.map