Skip to content

apm.startTransaction() should return a NoopTransaction if the Agent is not yet started #2429

@trentm

Description

@trentm

See discussion on #2425. It was decided there that, while the TypeScript types in index.d.ts allow apm.startTransaction() returning null is some cases, it could be a breaking change to JS users of apm.startTransaction(...) that did not handle this case -- especially because the Agent API docs for startTransaction don't mention the possibility of getting null.

Update: This comment has the best description for why we are dropping | null from the return type of apm.startTransaction().

Metadata

Metadata

Assignees

Labels

agent-nodejsMake available for APM Agents project planning.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions