Optional
consoleMethodsToRecord?: (Optional
disableConsoleRecording?: booleanSpecifies whether the SDK will record console messages.
Optional
enablePerformanceRecording?: booleanSpecifies whether to record performance metrics (e.g. FPS, device memory).
Optional
enablePromisePatch?: booleanSpecifies whether window.Promise should be patched to record the stack trace of promise rejections.
Optional
environment?: stringSpecifies the environment your application is running in. This is useful to distinguish whether your session was recorded on localhost or in production.
Optional
networkRecording?: boolean | NetworkRecordingOptionsSpecifies how and what the SDK records from network requests and responses.
Optional
otel?: OtelOptions & {OTLP options for OpenTelemetry tracing. Instrumentations are enabled by default.
Optional
reportConsoleErrors?: booleanSpecifies whether the SDK will report console.error
invocations as Errors.
Optional
tracingOrigins?: boolean | (string | RegExp)[]Specifies where the backend of the app lives. If specified, the SDK will attach the traceparent header to outgoing requests whose destination URLs match a substring or regexp from this list, so that backend errors can be linked back to the session. If 'true' is specified, all requests to the current domain will be matched.
Verbose project ID that is exposed to users. Legacy users may still be using ints.
Record arbitrary metric values via as a Counter. A Counter efficiently records an increment in a metric, such as number of cache hits. Values with the same metric name and attributes are aggregated via the OTel SDK. See https://opentelemetry.io/docs/specs/otel/metrics/data-model/ for more details.
Calling this method will report an error in Highlight and map it to the current session being recorded.
A common use case for H.error
is calling it right outside of an error boundary.
Optional
message: stringOptional
payload: { [key: string]: string }Optional
source: stringOptional
type: ErrorMessageTypehttps://docs.highlight.run/grouping-errors for more information.
Record arbitrary metric values via as a Gauge. A Gauge records any point-in-time measurement, such as the current CPU utilization %. Values with the same metric name and attributes are aggregated via the OTel SDK. See https://opentelemetry.io/docs/specs/otel/metrics/data-model/ for more details.
Record arbitrary metric values via as a Histogram. A Histogram efficiently records near-by point-in-time measurement into a bucketed aggregate. Values with the same metric name and attributes are aggregated via the OTel SDK. See https://opentelemetry.io/docs/specs/otel/metrics/data-model/ for more details.
Record arbitrary metric values via as a Counter. A Counter efficiently records an increment in a metric, such as number of cache hits. Values with the same metric name and attributes are aggregated via the OTel SDK. See https://opentelemetry.io/docs/specs/otel/metrics/data-model/ for more details.
Record arbitrary logs from your own integrations or manual. Useful when you don't want to emit a console log to the browser dev tools but still want to report a custom log.
Optional
metadata: AttributesRecord arbitrary metric values via as a UpDownCounter. A UpDownCounter efficiently records an increment or decrement in a metric, such as number of paying customers. Values with the same metric name and attributes are aggregated via the OTel SDK. See https://opentelemetry.io/docs/specs/otel/metrics/data-model/ for more details.
Start the observability data capture when running in manualStart
mode.
Starts a new span for tracing in Highlight. The span will be ended when the
end()
is called on the span. It returns whatever is returned from the
callback function.
The name of the span.
Options for the span.
Optional
context: Context | ((span: Span) => any)The context for the span.
Optional
fn: (span: Span) => anyThe function to run in the span.
Starts a new span for tracing in Highlight. The span will be ended when the callback function returns.
The name of the span.
Options for the span.
Optional
context: Context | ((span?: Span) => any)The context for the span.
Optional
fn: (span?: Span) => anyStop the observability data capture.
Specifies which console methods to record. The value here will be ignored if
disabledConsoleRecording
istrue
.