Browser init() bundles all default integrations
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 54/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, node.js, typescript
- Domínio
- build-system, developer-experience, frontend
Direção de pesquisa
Read the @sentry/browser init implementation in build/npm/esm/prod/sdk.js and compare it with the initWithoutDefaultIntegrations exports in @sentry/node and @sentry/bun. Check whether a browser entry point can avoid referencing getDefaultIntegrations while preserving the browser setup steps named in the issue. Done means the new path is tree-shakeable and the reported bundle excludes unused default integrations.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
init() in @sentry/browser 11.10.0 picks the default integrations at runtime (options.defaultIntegrations == null ? getDefaultIntegrations() : ... in build/npm/esm/prod/sdk.js). A bundler can't drop that branch, so all 12 default integrations ship even when the app passes defaultIntegrations: false.
init({ dsn, defaultIntegrations: false, integrations: [browserTracingIntegration()] });
- Bundled alone with esbuild 0.27 (minified, ESM, browser): 161,358 B raw / 49,098 B br-11.
- The same setup with
new BrowserClient({ ..., stackParser: defaultStackParser, transport: makeFetchTransport }),setCurrentClient(client)andclient.init()comes to 137,636 B raw / 42,099 B br-11. That's about 24 KB raw of integration code that never runs (breadcrumbs, globalHandlers, browserApiErrors, browserSession, linkedErrors, dedupe, httpContext, cultureContext, console, eventFilters, functionToString, conversationId). - The manual setup skips the other things
init()does (resolveBrowserTunnelOption, the browser-extension check,setNormalizeStringifier), so it isn't a full replacement. @sentry/nodeand@sentry/bunalready exportinitWithoutDefaultIntegrations.@sentry/browserhas no equivalent.
Proposal from the reporter: give @sentry/browser a tree-shakeable init path that doesn't reference getDefaultIntegrations. One example is a browser initWithoutDefaultIntegrations.
Seen in getsentry/junior's dashboard, which now builds the client by hand to avoid this.
via @BYK.
--
- Linguagem predominante
- TypeScript
- Estrelas
- 8.8k
- Forks
- 1.9k
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 744
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de getsentry/sentry-javascript
-
AWS Lambda Waiting for: Product Owner
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
getsentry/sentry-javascript#26910 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Only create Nuxt database and storage spans when there is a parent spanTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaImprovement Nuxt
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
getsentry/sentry-javascript#25805 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
Only create Cloudflare storage and D1 db spans when there is a parent spanTalvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. AbertaCloudflare Workers Improvement Spans
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
getsentry/sentry-javascript#25804 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Core Feature: Typescript Meta: Breaking
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
getsentry/sentry-javascript#25286 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
javascript
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
getsentry/sentry-javascript#24200 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de getsentry/sentry-javascript
Issues semelhantes
-
Postgres upgrade golden leaves fixture URL query parameters in the expected output comparisonAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
garrytan/gbrain#10437 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Bedrock "Too many tokens" throttle is not auto-retried, unlike "Too many requests"Talvez já em andamento @acmerfight assumiu hoje. Abertauntriaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
earendil-works/pi#12573 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
agentes-chat/agentes-chat#1506 ·
Mantenedores costumam responder em até 1 dia
-
comp/desktop desktop/files os/windows P2 type/perf
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
NousResearch/hermes-agent#160359 ·
Mantenedores costumam responder em até 1 dia
-
Missing repro Platform: Android
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
software-mansion/react-native-reanimated#11554 · 1 comentário ·
Mantenedores costumam responder em até 1 dia