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(browser): Make fetch the default transport for offline #11209

Merged
merged 2 commits into from Mar 21, 2024

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Mar 20, 2024

Now we only have one included transport, this simplifies the vast majority of use cases:

Before:

import { init, makeBrowserOfflineTransport, makeFetchTransport } from "@sentry/browser";

init({
  dsn: "__DSN__",
  transport: makeBrowserOfflineTransport(makeFetchTransport)
})

After:

import { init, makeBrowserOfflineTransport } from "@sentry/browser";

init({
  dsn: "__DSN__",
  transport: makeBrowserOfflineTransport()
})

This comment was marked as outdated.

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you write an entry in MIGRATION.md?

@timfish
Copy link
Collaborator Author

timfish commented Mar 21, 2024

I don't think this needs to be in MIGRATION.md because the parameter is still there, it just has a default now. The previous code will continue to work.

@AbhiPrasad AbhiPrasad merged commit 523b006 into develop Mar 21, 2024
87 checks passed
@AbhiPrasad AbhiPrasad deleted the timfish/offline-defaults branch March 21, 2024 15:42
cadesalaberry pushed a commit to cadesalaberry/sentry-javascript that referenced this pull request Apr 19, 2024
…y#11209)

Now we only have one included transport, this simplifies the vast
majority of use cases:

Before:
```ts
import { init, makeBrowserOfflineTransport, makeFetchTransport } from "@sentry/browser";

init({
  dsn: "__DSN__",
  transport: makeBrowserOfflineTransport(makeFetchTransport)
})
```

After:
```ts
import { init, makeBrowserOfflineTransport } from "@sentry/browser";

init({
  dsn: "__DSN__",
  transport: makeBrowserOfflineTransport()
})
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants