Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix telemetry failure for long-running sessions #228

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HowardWolosky
Copy link
Member

The telemetry code was creating a singleton base telemetry event the first time that telemetry was being sent. That base event included the date. If a PowerShell session lasted multiple days, the telemetry reporting would eventually start to fail because the date being reported for the event was too old.

We now just create a new telemetry event every time one is requested (this also ensures that it honors changes to the ApplicationInsightsKey), and now we only cache a GUID that we use to represent the "session" ID which we consider to be the duration of the current PowerShell session.

The telemetry code was creating a singleton base telemetry event the
first time that telemetry was being sent.  That base event included the
date.  If a PowerShell session lasted multiple days, the telemetry
reporting would eventually start to fail because the date being reported
for the event was too old.

We now just create a new telemetry event every time one is requested
(this also ensures that it honors changes to the `ApplicationInsightsKey`),
and now we only cache a GUID that we use to represent the "session" ID
which we consider to be the duration of the current PowerShell session.
… telemetry more than once per session. Use a flag to mimic that now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants