Provide visibility to errors if segment events do not send
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start in packages/browser/src/core/events/index.ts around line 264, then read the eventProperties type in packages/browser/src/core/events/interfaces.ts around line 22. Trace how analytics.track reports successful sends and handles serialization or other event errors. Done means consuming applications can observe successful sends and receive failures instead of having them silently swallowed.
Written by the indexing model from the issue text.
Description
Found that we're unable to see when segment events have successfully sent: when calling analytics.track the app receives undefined as a response (even if the event has been sent successfully). When an event has not been successfully sent there have been multiple times an error gets swallowed inside analytics-next and never surface to the consuming app.
Examples:
- When sending additional eventProperties I accidentally sent data that could not be json stringified saw in the debugger that the even failed here but we did not have access to the error so an error was never thrown inside our app even though we have analytics.track wrapped in a try/catch. There's no way to have typescript catch this error prior to sending because eventProperties are type to take any value
- We were unable to see that the utm-parameter 'search' should be passed in as a string - https://github.com/segmentio/analytics-next/pull/839 so we were silently not sending events.
- Dominant language
- TypeScript
- Stars
- 477
- Forks
- 160
- Avg merge
- 6h 19m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from segmentio/analytics-next
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
segmentio/analytics-next#1324 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
segmentio/analytics-next#1366 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
segmentio/analytics-next#1338 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
segmentio/analytics-next#1337 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
segmentio/analytics-next#1332 ·
All issues in segmentio/analytics-next
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·