Skip to content

Commit

Permalink
fix(api): clean up method signature
Browse files Browse the repository at this point in the history
Co-authored-by: Godfrey Chan <[email protected]>
  • Loading branch information
brianphillips and chancancode authored Jan 23, 2025
1 parent 074324b commit e36accc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 9 additions & 4 deletions api/src/trace/NonRecordingSpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,13 @@ export class NonRecordingSpan implements Span {

// By default does nothing
recordException(
_exception: Exception,
_attributesOrStartTime?: SpanAttributes | TimeInput,
_time?: TimeInput
): void {}
exception: Exception,
time?: TimeInput
): void;
recordException(
exception: Exception,
attributes: SpanAttributes | undefined,
time?: TimeInput
): void;
recordException(): void {}
}
6 changes: 5 additions & 1 deletion api/src/trace/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ export interface Span {
*/
recordException(
exception: Exception,
attributes?: SpanAttributes,
time?: TimeInput
): void;
recordException(
exception: Exception,
attributes: SpanAttributes | undefined,
time?: TimeInput
): void;
}

0 comments on commit e36accc

Please sign in to comment.