microsoft / microsoft/ApplicationInsights-JS

Preserve Telemetry for PWA Scenario

Open
#1,537 4 comments 2 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

### Feature Request: Add LocalStorage Telemetry Preservation

In the case of progresive web apps, the user can be offline for long periods of time, closing and opening the app all the while.
In this scenario, because we are using `sessionStorage` the telemetry is getting wiped on refresh / reloading the PWA.
It would be great if we could add the ability to specify `localStorage` in addition to `sessionStorage` and `localBufferArray` to preserve the telemetry for longer.

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

Start by tracing the existing sessionStorage and localBufferArray telemetry paths in the SDK. Check how storage is selected and how PWA reloads should retain data, then verify that an opt-in localStorage option preserves telemetry without breaking current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
observability, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.