Conversation
Lms24
left a comment
There was a problem hiding this comment.
Nice! I prefer this table over the list we keep below (see other comment)
WDYT about mentioning getCurrentHub, too here? It's probably the most common way how users interact with the Hub API
Co-authored-by: Lukas Stracke <lukas.stracke@sentry.io>
MIGRATION.md
Outdated
| | `new Hub()` | `withScope()`, `withIsolationScope()` or `new Scope()` | | ||
| | hub.isOlderThan() | REMOVED - Was used to compare `Hub` instances, which are gonna be removed. | | ||
| | hub.bindClient() | A combination of `scope.setClient()` and `client.setupIntegrations()` | | ||
| | hub.pushScope() | Best replaced with `withScope()` | |
There was a problem hiding this comment.
| | hub.pushScope() | Best replaced with `withScope()` | | |
| | hub.pushScope() | `Sentry.withScope()` | |
MIGRATION.md
Outdated
| | hub.isOlderThan() | REMOVED - Was used to compare `Hub` instances, which are gonna be removed. | | ||
| | hub.bindClient() | A combination of `scope.setClient()` and `client.setupIntegrations()` | | ||
| | hub.pushScope() | Best replaced with `withScope()` | | ||
| | hub.popScope() | When used in combination with `hub.pushScope()` best replaced with `withScope()` | |
There was a problem hiding this comment.
| | hub.popScope() | When used in combination with `hub.pushScope()` best replaced with `withScope()` | | |
| | hub.popScope() | `Sentry.withScope()` | |
MIGRATION.md
Outdated
| | hub.pushScope() | Best replaced with `withScope()` | | ||
| | hub.popScope() | When used in combination with `hub.pushScope()` best replaced with `withScope()` | | ||
| | hub.withScope() | `withScope()` | | ||
| | getClient() | `scope.getClient` | |
There was a problem hiding this comment.
| | getClient() | `scope.getClient` | | |
| | getClient() | `Sentry.getClient()` | |
There was a problem hiding this comment.
users should never use scope.getClient() in the future, as we want to cascade the clients in v8 (so it is only set on the isolation scope).
MIGRATION.md
Outdated
| | hub.popScope() | When used in combination with `hub.pushScope()` best replaced with `withScope()` | | ||
| | hub.withScope() | `withScope()` | | ||
| | getClient() | `scope.getClient` | | ||
| | getScope() | REMOVED - Scopes are used directly now. | |
There was a problem hiding this comment.
| | getScope() | REMOVED - Scopes are used directly now. | | |
| | getScope() | `Sentry.getCurrentScope()` to get the currently active scope | |
MIGRATION.md
Outdated
| | hub.bindClient() | A combination of `scope.setClient()` and `client.setupIntegrations()` | | ||
| | hub.pushScope() | Best replaced with `withScope()` | | ||
| | hub.popScope() | When used in combination with `hub.pushScope()` best replaced with `withScope()` | | ||
| | hub.withScope() | `withScope()` | |
There was a problem hiding this comment.
| | hub.withScope() | `withScope()` | | |
| | hub.withScope() | `Sentry.withScope()` | |
MIGRATION.md
Outdated
| | captureException() | `scope.captureException()` | | ||
| | captureMessage() | `scope.captureMessage()` | | ||
| | captureEvent() | `scope.captureEvent()` | |
There was a problem hiding this comment.
| | captureException() | `scope.captureException()` | | |
| | captureMessage() | `scope.captureMessage()` | | |
| | captureEvent() | `scope.captureEvent()` | | |
| | captureException() | `Sentry.captureException()` | | |
| | captureMessage() | `Sentry.captureMessage()` | | |
| | captureEvent() | `Sentry.captureEvent()` | |
IMHO users should avoid using these on the scope directly, just use the global methods.
MIGRATION.md
Outdated
| | addBreadcrumb() | `scope.addBreadcrumb()` | | ||
| | setUser() | `scope.setUser()` | | ||
| | setTags() | `scope.setTags()` | | ||
| | setExtras() | `scope.setExtras()` | | ||
| | setTag() | `scope.setTag()` | | ||
| | setExtra() | `scope.setExtra()` | | ||
| | setContext() | `scope.setContext()` | |
There was a problem hiding this comment.
| | addBreadcrumb() | `scope.addBreadcrumb()` | | |
| | setUser() | `scope.setUser()` | | |
| | setTags() | `scope.setTags()` | | |
| | setExtras() | `scope.setExtras()` | | |
| | setTag() | `scope.setTag()` | | |
| | setExtra() | `scope.setExtra()` | | |
| | setContext() | `scope.setContext()` | | |
| | addBreadcrumb() | `Sentry.addBreadcrumb()` | | |
| | setUser() | `Sentry.setUser()` | | |
| | setTags() | `Sentry.setTags()` | | |
| | setExtras() | `Sentry.setExtras()` | | |
| | setTag() | `Sentry.setTag()` | | |
| | setExtra() | `Sentry.setExtra()` | | |
| | setContext() | `Sentry.setContext()` | |
MIGRATION.md
Outdated
| | setExtra() | `scope.setExtra()` | | ||
| | setContext() | `scope.setContext()` | | ||
| | configureScope() | REMOVED - Scopes are now the unit of concurrency. | | ||
| | run() | `withScope()` or `withIsolationScope()` | |
There was a problem hiding this comment.
| | run() | `withScope()` or `withIsolationScope()` | | |
| | run() | `Sentry.withScope()` or `Sentry.withIsolationScope()` | |
MIGRATION.md
Outdated
| | configureScope() | REMOVED - Scopes are now the unit of concurrency. | | ||
| | run() | `withScope()` or `withIsolationScope()` | | ||
| | getIntegration() | `client.getIntegration()` | | ||
| | startTransaction() | `startSpan()`, `startInactiveSpan()` or `startSpanManual()` | |
There was a problem hiding this comment.
| | startTransaction() | `startSpan()`, `startInactiveSpan()` or `startSpanManual()` | | |
| | startTransaction() | `Sentry.startSpan()`, `Sentry.startInactiveSpan()` or `Sentry.startSpanManual()` | |
Adds documentation on how to migrate off the hub API to the MIGRATION guide. This is still a bit basic - we will expand on this once we have figured out all of our migration paths and are finalizing v8.