You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 13f6e8b
Browse filesBrowse the repository at this point in the historyBrowse files
feat(effect): Remove effectLayer auto composition (#19823)
There are 2 changes in this PR:
1. No auto-injection anymore
2. Removal of the OP and the span names. We fully rely now on Effect as
much as possible (related:
#19644 (comment))
About the removal of auto injection of traces, logs or metrics from the
`Sentry.effectLayer`: this means that `Sentry.effectLayer` is **only**
initializing the browser/node client. So the usages in comparison for
logs and traces:
before:
```js
Layer.provide(Sentry.effectLayer({
dsn: '',
tracesSampleRate: 1.0,
enableLogs: true,
enableEffectLogs: true,
}));
```
after:
```js
import * as Layer from "effect/Layer";
import * as Logger from "effect/Logger"
Layer.mergeAll(
Sentry.effectLayer({
dsn: '',
tracesSampleRate: 1.0,
enableLogs: true,
},
Layer.setTracer(Sentry.SentryEffectTracer),
Logger.replace(Logger.defaultLogger, Sentry.SentryEffectLogger)
));
```
The benefit of this is to have a unified usage between browser and node,
which also follows the usage of Effect, so users have to actively set
the tracer with `setTracer` or replace the logger with `Logger.replace`.
There is no extra opt-in via `enableEffectLogs` or
`enableEffectMetrics`, this would also remove the confusion of not
having the `enableEffectTraces` option (which didn't exist before, nor
would have existed in any future versions)
This was discussed offline with @Lms24 to have this. In the first alpha
we can always shift if there is the need, but this is now way cleaner. I
ask myself now if `Sentry.effectLayer` is now the best function name.
0 commit comments