Skip to content

Commit

Permalink
feat(otel): Move instrumenter option to base ClientOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea committed Nov 3, 2022
1 parent 8f593f9 commit f05cdeb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 1 addition & 10 deletions packages/node/src/types.ts
@@ -1,4 +1,4 @@
import { ClientOptions, Instrumenter, Options, TracePropagationTargets } from '@sentry/types';
import { ClientOptions, Options, TracePropagationTargets } from '@sentry/types';

import { NodeTransportOptions } from './transports';

Expand All @@ -19,15 +19,6 @@ export interface BaseNodeOptions {
*/
tracePropagationTargets?: TracePropagationTargets;

/**
* The instrumenter to use. Defaults to `sentry`.
* When not set to `sentry`, auto-instrumentation inside of Sentry will be disabled,
* in favor of using external auto instrumentation.
*
* NOTE: Any option except for `sentry` is highly experimental and subject to change!
*/
instrumenter?: Instrumenter;

/** Callback that is executed when a fatal global error occurs. */
onFatalError?(error: Error): void;
}
Expand Down
10 changes: 10 additions & 0 deletions packages/types/src/options.ts
@@ -1,5 +1,6 @@
import { Breadcrumb, BreadcrumbHint } from './breadcrumb';
import { Event, EventHint } from './event';
import { Instrumenter } from './instrumenter';
import { Integration } from './integration';
import { CaptureContext } from './scope';
import { SdkMetadata } from './sdkmetadata';
Expand Down Expand Up @@ -58,6 +59,15 @@ export interface ClientOptions<TO extends BaseTransportOptions = BaseTransportOp
*/
integrations: Integration[];

/**
* The instrumenter to use. Defaults to `sentry`.
* When not set to `sentry`, auto-instrumentation inside of Sentry will be disabled,
* in favor of using external auto instrumentation.
*
* NOTE: Any option except for `sentry` is highly experimental and subject to change!
*/
instrumenter?: Instrumenter;

/**
* A function that takes transport options and returns the Transport object which is used to send events to Sentry.
* The function is invoked internally when the client is initialized.
Expand Down

0 comments on commit f05cdeb

Please sign in to comment.