Refactor Envelope build & sending

Aperta
#643 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
api

Direzione di ricerca

Leggi la SDK envelope specification, quindi esamina le API di transport, Event, Envelope e Envelope Item menzionate nell’issue. Traccia il modo in cui gli eventi vengono attualmente passati a transport e identifica l’elaborazione specifica degli eventi presente lì. Il lavoro è completato quando transport accetta gli envelopes e non dipende più dagli event types; nell’issue non è indicato alcun test specifico.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature Go

Summary

Currently, events are handed over to transport for sending. In order to fully switch to Envelopes, transport should not know about events and instead accept envelopes for sending. Transport should also not do any event-type specific processing - all the information transport needs is contained in the Envelope & its Items. See https://develop.sentry.dev/sdk/envelopes/

Motivation

Besides finishing the move to Envelopes, the separation of concerns would allow us to build envelopes with multiple items, without hacking around events, as I've had to do in here - adding a transactionProfile field to Event and handling that in transport.go.

Additional Context

Ideally, I'd also suggest something to think about in the future - changing the APIs to not accept Event struct but rather an interface, sth. like which just knows how to serialize and deserialize itself. This would also make it more flexible and avoid adding fields specific to different event types, e.g. Transactions, as there already are.

Lingua principale
Go
Stelle
1.1k
Fork
264
Merge medio
2g 1h
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-go

Tutte le issue di getsentry/sentry-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.