microsoft / microsoft/ApplicationInsights-JS

Handle locally stored data that is too old to send anymore.

Open
#205 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
685
Forks
261
Avg merge
21h 33m
Merged PRs (30d)
5

Description

Data which was saved to local storage due to the user navigating away or closing the browser might end up being older than the current two day max age for sending by the time the page is loaded again.
We could either drop old data ourselves or handle the 400 error code from the server.

Example 206 response with a 400 rejected item in the batch:
{"itemsReceived":2,"itemsAccepted":1,"errors":[{"index":1,"statusCode":400,"message":"103: Field 'time' on type 'Envelope' is older than the allowed min date. Expected: now - 172800000ms, Actual: now - 414962282ms"}]}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by tracing the local-storage resend path and the handling of batch responses with rejected items; determine whether expired data is dropped locally or handled after the server response. Done means data older than the two-day limit no longer leaves the batch with an unhandled 400 rejection.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, javascript, typescript
Domain
observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.