Remove elastic-apm-node

This commit is contained in:
Thomas Watson
2019-03-26 21:20:54 +01:00
parent 9248d9e1f0
commit fe2d5debda
6 changed files with 6 additions and 154 deletions

View File

@@ -570,6 +570,12 @@
"sourceRepoURL": "https://github.com/eggjs/egg",
"asOfVersion": "1.5.0"
},
{
"libraryName": "elastic-apm-node",
"typingsPackageName": "elastic-apm-node",
"sourceRepoURL": "https://github.com/elastic/apm-agent-nodejs",
"asOfVersion": "2.7.0"
},
{
"libraryName": "electron",
"typingsPackageName": "electron",

View File

@@ -1,50 +0,0 @@
import {
Agent,
start
} from 'elastic-apm-node';
const agent: Agent = start({
serviceName: '',
secretToken: '',
serverUrl: ''
});
const started: boolean = agent.isStarted();
function testCallbacks() {
const testError: Error = new Error("Test Error");
agent.captureError(testError, {error: "test"}, (err: Error) => err = testError);
agent.captureError(testError, {error: "test"});
agent.captureError(testError);
agent.addFilter((payload: any) => {
return payload;
});
agent.handleUncaughtExceptions((err: Error) => err = testError);
agent.flush((test: any) => test);
}
const customContext: boolean = agent.setCustomContext({
id: "test id",
username: "test user",
email: "testEmail@test.com"
});
const userContext: boolean = agent.setUserContext({
id: "test id",
username: "test user",
email: "testEmail@test.com"
});
const transactionName: any = agent.setTransactionName("new name");
const tags: any = agent.setTag("name", "value");
const addedTags: any = agent.addTags({name: "value"});
const startSpan: any = agent.startSpan();
const secondStartSpan: any = agent.startSpan("name", 13);
const transaction = agent.startTransaction();

View File

@@ -1,75 +0,0 @@
// Type definitions for Elastic APM Node.js Agent 1.x
// Project: https://www.elastic.co/solutions/apm, https://github.com/elastic/apm-agent-nodejs
// Definitions by: Shahaed Hasan <https://github.com/shahaed>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
export = a;
declare const a: a.Agent;
declare namespace a {
interface Agent {
currentTransaction: any;
logger: any;
start(opts?: AgentOptions): Agent;
isStarted(): boolean;
addFilter(filter: (payload: any) => any): void;
setUserContext(context: Context): boolean;
setCustomContext(context: any): boolean;
setTag(name: string, value: string): any;
addTags(tags: any): any;
captureError(error: Error | string | object, options?: object, callback?: (err?: any) => any): void;
startTransaction(name?: string, type?: string): any;
endTransaction(result?: any): any;
setTransactionName(name: string): any;
startSpan(name?: string, type?: any): any;
handleUncaughtExceptions(callback?: (err: Error) => any): any;
flush(callback?: any): any;
lambda(type: any, handler?: any): any;
}
interface AgentOptions {
serviceName?: string;
secretToken?: string;
serverUrl?: string;
verifyServerCert?: boolean;
serviceVersion?: string;
active?: boolean;
instrument?: boolean;
asyncHooks?: boolean;
ignoreUrls?: Array<RegExp | string>;
ignoreUserAgents?: Array<RegExp | string>;
captureBody?: string;
errorOnAbortedRequests?: boolean;
abortedErrorThreshold?: number;
transactionSampleRate?: number;
hostname?: string;
frameworkName?: string;
frameworkVersion?: string;
logLevel?: string;
logger?: any;
captureExceptions?: boolean;
captureErrorLogStackTraces?: string;
captureSpanStackTraces?: boolean;
sourceLinesErrorAppFrames?: number;
sourceLinesErrorLibraryFrames?: number;
sourceLinesSpanAppFrames?: number;
sourceLinesSpanLibraryFrames?: number;
errorMessageMaxLength?: number;
stackTraceLimit?: number;
transactionMaxSpans?: number;
flushInterval?: number;
serverTimeout?: number;
maxQueueSize?: number;
filterHttpHeaders?: boolean;
disableInstrumentations?: string;
}
interface Context {
id?: string;
username?: string;
email?: string;
}
}

View File

@@ -1,2 +0,0 @@
import * as agent from './';
export = agent;

View File

@@ -1,24 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"elastic-apm-node-tests.ts",
"start.d.ts"
]
}

View File

@@ -1,3 +0,0 @@
{
"extends": "dtslint/dt.json"
}