diff --git a/README.md b/README.md index 8aae573..7925276 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,8 @@ Pass these options to the HoneycombWebSDK: | name | required? | type | default value | description | | ---- | --------- | ---- | ------------- | ----------- | -| enabled | optional | boolean | `true` | Where or not to enable this auto instrumentation. | +| enabled | optional | boolean | `true` | Whether or not to enable this auto instrumentation. | +| applyCustomAttributesOnSpan | optional | function | n/a | A callback function for adding custom attributes to the span when an error is recorded. Will automatically be applied to all spans generated by the auto-instrumentation. | #### `recordException` Helper Function @@ -129,14 +130,16 @@ The `recordException` function is a utility to send exception spans with semanti | Parameter | Type | Default Value | Description | |-------------|------------|----------------------------------------|-----------------------------------------------------------------------------| | `error` | `Error` | N/A | The error object to record. This should be an instance of the JavaScript `Error` class. | -| `attributes`| `Attributes`| `{}` | Additional attributes to add to the span. This can include any custom metadata you want to associate with the error. | +| `attributes`| `Attributes`| `{}` | Additional attributes to add to the span. This can include any custom metadata you want to associate with the error. Will likely be deprecated in favour of using the callback function option `applyCustomAttributesOnSpan` in the future. | | `tracer` | `Tracer` | `trace.getTracer(LIBRARY_NAME)` | The tracer to use for recording the span. If not provided, the default tracer for the library will be used. | +| `applyCustomAttributesOnSpan` | function | n/a | A callback function for adding custom attributes to the span when an error is recorded. | ```js recordException( error: Error, attributes?: Attributes, - tracer?: Tracer + tracer?: Tracer, + applyCustomAttributesOnSpan? ): void ```