-
Notifications
You must be signed in to change notification settings - Fork 235
Closed
Labels
agent-nodejsMake available for APM Agents project planning.Make available for APM Agents project planning.
Milestone
Description
Currently in index.d.ts:
export interface Agent {
// ...
destroy (): void;
}
In the coming OTel Metrics work, Agent.destroy()
will possibly call an async method to shutdown an OTel MeterProvider. This means that agent shutdown code can possibly be running after the sync Agent.destroy()
method returns. That's unfortunate.
The fix is to make Agent.destroy()
async -- i.e. returns a Promise -- then the user can await
it. However, is changing that return type in the TypeScript types a breaking change? I'm not sure.
Metadata
Metadata
Assignees
Labels
agent-nodejsMake available for APM Agents project planning.Make available for APM Agents project planning.