Skip to content
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

feat(core)!: Remove addOpenTelemetryInstrumentation method #14792

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
13 changes: 13 additions & 0 deletions docs/migration/v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@ It will be removed in a future major version.

- The `debugIntegration` has been removed. To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...).
- The `sessionTimingIntegration` has been removed. To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`).
- The `addOpenTelemetryInstrumentation` method has been removed. Use the `openTelemetryInstrumentations` option in `Sentry.init()` or your custom Sentry Client instead.

```js
import * as Sentry from '@sentry/node';

// before
Sentry.addOpenTelemetryInstrumentation(new GenericPoolInstrumentation());

// after
Sentry.init({
openTelemetryInstrumentations: [new GenericPoolInstrumentation()],
});
```

### `@sentry/react`

Expand Down
2 changes: 0 additions & 2 deletions packages/astro/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export {
addEventProcessor,
addIntegration,
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
// eslint-disable-next-line deprecation/deprecation
addRequestDataToEvent,
amqplibIntegration,
anrIntegration,
Expand Down
2 changes: 0 additions & 2 deletions packages/aws-serverless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ export {
spanToBaggageHeader,
trpcMiddleware,
updateSpanName,
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
zodErrorsIntegration,
profiler,
amqplibIntegration,
Expand Down
2 changes: 0 additions & 2 deletions packages/bun/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ export {
spanToBaggageHeader,
trpcMiddleware,
updateSpanName,
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
zodErrorsIntegration,
profiler,
amqplibIntegration,
Expand Down
2 changes: 0 additions & 2 deletions packages/google-cloud-serverless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ export {
spanToBaggageHeader,
trpcMiddleware,
updateSpanName,
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
zodErrorsIntegration,
profiler,
amqplibIntegration,
Expand Down
2 changes: 0 additions & 2 deletions packages/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ export type { NodeOptions } from './types';
export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/core';

export {
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
// These are custom variants that need to be used instead of the core one
// As they have slightly different implementations
continueTrace,
Expand Down
3 changes: 0 additions & 3 deletions packages/opentelemetry/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,5 @@ export {

export { openTelemetrySetupCheck } from './utils/setupCheck';

// eslint-disable-next-line deprecation/deprecation
export { addOpenTelemetryInstrumentation } from './instrumentation';

// Legacy
export { getClient } from '@sentry/core';
15 changes: 0 additions & 15 deletions packages/opentelemetry/src/instrumentation.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export {
addEventProcessor,
addIntegration,
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
// eslint-disable-next-line deprecation/deprecation
addRequestDataToEvent,
amqplibIntegration,
anrIntegration,
Expand Down
2 changes: 0 additions & 2 deletions packages/solidstart/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export {
addEventProcessor,
addIntegration,
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
// eslint-disable-next-line deprecation/deprecation
addRequestDataToEvent,
amqplibIntegration,
anrIntegration,
Expand Down
2 changes: 0 additions & 2 deletions packages/sveltekit/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export {
addEventProcessor,
addIntegration,
// eslint-disable-next-line deprecation/deprecation
addOpenTelemetryInstrumentation,
// eslint-disable-next-line deprecation/deprecation
addRequestDataToEvent,
amqplibIntegration,
anrIntegration,
Expand Down
Loading