Skip to content

Commit

Permalink
Reduce ambiguity in the API
Browse files Browse the repository at this point in the history
  • Loading branch information
dvoytenko committed Aug 28, 2023
1 parent f70a9df commit 8f71f2c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion api/src/trace/span.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,18 @@ export interface Span {
* @param [time] the time to set as Span's event time. If not provided,
* use the current time.
*/
recordException(exception: Exception, time?: TimeInput): void;

/**
* Sets exception as a span event
* @param exception the exception the only accepted values are string or Error
* @param [attributes] the attributes that will be added to the error event.
* @param [time] the time to set as Span's event time. If not provided,
* use the current time.
*/
recordException(
exception: Exception,
attributesOrStartTime?: SpanAttributes | TimeInput,
attributes?: SpanAttributes,
time?: TimeInput
): void;
}

0 comments on commit 8f71f2c

Please sign in to comment.