Skip to content

Commit

Permalink
[#117] node-agent index.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
feelform committed Dec 29, 2022
1 parent 59041aa commit 60c6617
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
19 changes: 2 additions & 17 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
declare namespace Pinpoint {
export interface Agent {
start(initOptions: any);
initializeDataSender(): void;
initializeSupportModules(): void;
initializePinpointClient(): void;
createTraceObject(requestData: any): Trace;
currentTraceObject(): any;
completeTraceObject(trace: any): void;
createAgentInfo(config: any, agentStartTime: any): AgentInfo;
startSchedule(agentId: any, agentStartTime: any): void;
spanEndCallbackWrapper(trace: any, spanEventRecorder: any, original: any): any;
}

export interface Trace {
}

export interface AgentInfo {
export class Agent {
constructor(initOptions: any);
}
}
declare const pinpointAgent: Pinpoint.Agent;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "pinpoint-node-agent",
"version": "0.9.0-next.2",
"main": "index.js",
"types": "index.d.ts",
"type": "commonjs",
"scripts": {
"test": "./node_modules/.bin/tape ./test/**/*.test.js",
Expand Down
2 changes: 1 addition & 1 deletion test/context/callstack.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ test.skip(`fix express call stack depth`, async (t) => {

const router1 = express.Router()
router1.get(path, async (req, res) => {
const result = await axios.get(`https://eonet.sci.gsfc.nasa.gov/api/v2.1/categories`)
const result = await axios.get(`https://github.com`)
t.equal(result.status, 200)
res.send('ok router1')
})
Expand Down
2 changes: 1 addition & 1 deletion test/instrumentation/module/http.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test(`outgoing request URL escape a bug`, async (t) => {
const trace = agent.createTraceObject()
t.true(trace)

axios.get(`https://eonet.sci.gsfc.nasa.gov/api/v2.1/categories`)
axios.get(`https://github.com`)
.then(function (response) {
t.true(response.status == 200)

Expand Down
2 changes: 1 addition & 1 deletion test/instrumentation/module/mongodb-core.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const {
GenericContainer
} = require("testcontainers")

test(`mongodb`, async (t) => {
test.skip(`mongodb`, async (t) => {
const container = await new GenericContainer("mongo")
.withExposedPorts(27017)
.start()
Expand Down

0 comments on commit 60c6617

Please sign in to comment.