diff --git a/src/trace/tracer.ts b/src/trace/tracer.ts index 13c19ec..3c76927 100644 --- a/src/trace/tracer.ts +++ b/src/trace/tracer.ts @@ -50,36 +50,37 @@ export interface Tracer { * @param fn function called in the context of the span and receives the newly created span as an argument * @returns return value of fn * @example - * const something = tracer.startActiveSpan('op', span => { - * try { - * do some work - * span.setStatus({code: SpanStatusCode.OK}); - * return something; - * } catch (err) { - * span.setStatus({ - * code: SpanStatusCode.ERROR, - * message: err.message, - * }); - * throw err; - * } finally { - * span.end(); - * } - * }); + * const something = tracer.startActiveSpan('op', span => { + * try { + * do some work + * span.setStatus({code: SpanStatusCode.OK}); + * return something; + * } catch (err) { + * span.setStatus({ + * code: SpanStatusCode.ERROR, + * message: err.message, + * }); + * throw err; + * } finally { + * span.end(); + * } + * }); + * * @example - * const span = tracer.startActiveSpan('op', span => { - * try { - * do some work - * return span; - * } catch (err) { - * span.setStatus({ - * code: SpanStatusCode.ERROR, - * message: err.message, - * }); - * throw err; - * } - * }); - * do some more work - * span.end(); + * const span = tracer.startActiveSpan('op', span => { + * try { + * do some work + * return span; + * } catch (err) { + * span.setStatus({ + * code: SpanStatusCode.ERROR, + * message: err.message, + * }); + * throw err; + * } + * }); + * do some more work + * span.end(); */ startActiveSpan unknown>( name: string,