UNPKG

@envelop/sentry

Version:

This plugin collects errors and performance tracing for your execution flow, and reports it to [Sentry](https://sentry.io).

13 lines (12 loc) 623 B
import { type Plugin } from '@envelop/core'; import { type TracingOptions } from '@envelop/opentelemetry'; import { Attributes, SpanKind, TracerProvider } from '@opentelemetry/api'; export type SentryPluginOptions = { otel?: TracingOptions; tracingProvider?: TracerProvider; spanKind?: SpanKind; spanAdditionalAttributes?: Attributes; serviceName?: string; spanPrefix?: string; }; export declare const useSentry: <PluginContext extends Record<string, any> = {}>({ otel, tracingProvider, spanKind, spanAdditionalAttributes, serviceName, spanPrefix, }?: SentryPluginOptions) => Plugin<PluginContext>;