Skip to content

feat(core): Add instrumenter option to ClientOptions #6128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat(otel): Move instrumenter option to base ClientOptions
  • Loading branch information
mydea committed Nov 3, 2022
commit f05cdeb13faf5b9e3b6782994cc0774b46a89850
11 changes: 1 addition & 10 deletions packages/node/src/types.ts
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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