Skip to content

Commit 52d5ffc

Browse files
authored
fix: SpanOptions TypeScript type should include 'startTime' (#2339)
1 parent 56c6763 commit 52d5ffc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ declare namespace apm {
324324
}
325325

326326
export interface SpanOptions {
327+
startTime?: number;
327328
childOf?: Transaction | Span | string;
328329
}
329330

test/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ apm.startSpan('foo', { childOf: 'baz' })
9898
apm.startSpan('foo', 'type', { childOf: 'baz' })
9999
apm.startSpan('foo', 'type', 'subtype', { childOf: 'baz' })
100100
apm.startSpan('foo', 'type', 'subtype', 'action', { childOf: 'baz' })
101+
apm.startSpan('foo', 'type', 'subtype', 'action', { startTime: 42 })
101102

102103
apm.setLabel('foo', 'bar')
103104
apm.setLabel('foo', 1)

0 commit comments

Comments
 (0)