highlight.run
Advanced tools
Comparing version 9.0.5 to 9.1.0
# highlight.run | ||
## 9.1.0 | ||
### Minor Changes | ||
- 463e99106: add browser OTEL tracing | ||
- 8fd0e8f92: add `startSpan` and `startManualSpan` methods | ||
## 9.0.5 | ||
@@ -4,0 +11,0 @@ |
@@ -14,2 +14,4 @@ import type { NetworkRecordingOptions } from '../types/client'; | ||
export declare const setupBrowserTracing: (config: BrowserTracingConfig) => void; | ||
export declare const BROWSER_TRACER_NAME = "highlight-browser"; | ||
export declare const getTracer: () => import("@opentelemetry/sdk-trace-web").Tracer; | ||
export declare const shutdown: () => Promise<void>; |
@@ -59,9 +59,2 @@ import { InstrumentationBase } from '@opentelemetry/instrumentation'; | ||
/** | ||
* Will try to end span when such span still exists. | ||
* @param span | ||
* @param endTime | ||
* @private | ||
*/ | ||
private _tryToEndSpan; | ||
/** | ||
* implements enable function | ||
@@ -68,0 +61,0 @@ */ |
@@ -0,1 +1,2 @@ | ||
import type { Context, Span, SpanOptions } from '@opentelemetry/api'; | ||
import { ConsoleMethods, DebugOptions, IntegrationOptions, NetworkRecordingOptions, SessionShortcutOptions } from './client.js'; | ||
@@ -261,2 +262,69 @@ import { ErrorMessageType } from './shared-types'; | ||
/** | ||
* Starts a new span for tracing in Highlight. The span will be ended when the | ||
* callback function returns. | ||
* | ||
* @example | ||
* ```typescript | ||
* H.startSpan('span-name', callbackFn) | ||
* ``` | ||
* @example | ||
* ```typescript | ||
* H.startSpan('span-name', options, callbackFn) | ||
* ``` | ||
* @example | ||
* ```typescript | ||
* H.startSpan('span-name', options, context, callbackFn) | ||
* ``` | ||
* @example | ||
* ```typescript | ||
* H.startSpan('span-name', async (span) => { | ||
* span.setAttribute('key', 'value') | ||
* await someAsyncFunction() | ||
* }) | ||
* ``` | ||
* | ||
* @param name The name of the span. | ||
* @param options Options for the span. | ||
* @param context The context for the span. | ||
* @param callbackFn The function to run in the span. | ||
*/ | ||
startSpan: { | ||
<F extends (span: Span) => ReturnType<F>>(name: string, fn: F): ReturnType<F>; | ||
<F extends (span: Span) => ReturnType<F>>(name: string, options: SpanOptions, fn: F): ReturnType<F>; | ||
<F extends (span: Span) => ReturnType<F>>(name: string, options: SpanOptions, context: Context, fn: F): ReturnType<F>; | ||
}; | ||
/** | ||
* 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. | ||
* | ||
* @example | ||
* ```typescript | ||
* H.startManualSpan('span-name', options, (span) => { | ||
* span.addEvent('event-name', { key: 'value' }) | ||
* span.setAttribute('key', 'value') | ||
* await someAsyncFunction() | ||
* span.end() | ||
* }) | ||
* ``` | ||
* | ||
* @example | ||
* ```typescript | ||
* const span = H.startManualSpan('span-name', (s) => s) | ||
* span.addEvent('event-name', { key: 'value' }) | ||
* await someAsyncFunction() | ||
* span.end() | ||
* ``` | ||
* | ||
* @param name The name of the span. | ||
* @param options Options for the span. | ||
* @param context The context for the span. | ||
* @param fn The function to run in the span. | ||
*/ | ||
startManualSpan: { | ||
<F extends (span: Span) => ReturnType<F>>(name: string, fn: F): ReturnType<F>; | ||
<F extends (span: Span) => ReturnType<F>>(name: string, options: SpanOptions, fn: F): ReturnType<F>; | ||
<F extends (span: Span) => ReturnType<F>>(name: string, options: SpanOptions, context: Context, fn: F): ReturnType<F>; | ||
}; | ||
/** | ||
* Calling this method will report an error in Highlight and map it to the current session being recorded. | ||
@@ -263,0 +331,0 @@ * A common use case for `H.error` is calling it right outside of an error boundary. |
@@ -1,2 +0,2 @@ | ||
declare const _default: "9.0.5"; | ||
declare const _default: "9.1.0"; | ||
export default _default; |
@@ -1,2 +0,2 @@ | ||
import { H as i, f as r, M as t, h as a } from "./index-BhvQ8N0D.js"; | ||
import { H as i, e as r, M as t, f as a } from "./index-BMD8Qire.js"; | ||
export { | ||
@@ -3,0 +3,0 @@ i as H, |
{ | ||
"name": "highlight.run", | ||
"version": "9.0.5", | ||
"version": "9.1.0", | ||
"description": "Open source, fullstack monitoring. Capture frontend errors, record server side logs, and visualize what broke with session replay.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
5705452
20699