Skip to content

Commit

Permalink
[pinpoint-apm#117] make Agent d.ts in repository
Browse files Browse the repository at this point in the history
  • Loading branch information
feelform committed Sep 12, 2023
1 parent 62d631e commit 5dbd43a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
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 {
}
}
declare const pinpointAgent: Pinpoint.Agent;
export = pinpointAgent;
4 changes: 2 additions & 2 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Agent {
apiMetaService.init(this.dataSender)

this.startSchedule(agentId, agentStartTime)
this.initailizeSupportModules()
this.initializeSupportModules()

log.warn('[Pinpoint Agent][' + agentId + '] Init Completed')
}
Expand All @@ -58,7 +58,7 @@ class Agent {
this.dataSender.send(this.agentInfo)
}

initailizeSupportModules() {
initializeSupportModules() {
this.moduleHook = new ModuleHook(this)
}

Expand Down

0 comments on commit 5dbd43a

Please sign in to comment.