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

"Pause" sending of messages #1093

Closed
LeopoldLerch opened this issue Oct 21, 2019 · 3 comments
Closed

"Pause" sending of messages #1093

LeopoldLerch opened this issue Oct 21, 2019 · 3 comments

Comments

@LeopoldLerch
Copy link
Contributor

Hi,
I have the usecase that some informations (eg. UserName) are not directly available after startup, but getting fetched after bodyloaded. However, appInsights should start asap on the page to be able to record every action/requests done already during pageload.

Problem is, that currently the first messages are sent to appInsights without the informations (eg. Username) as they were not available at that point.

What I want to ask is, if there is the possibility to somehow let the appInsights engine run, so that it can record everything, but hold back the sending of the messages to the server, until a specific event occurs (in my case all of the informations are available), eg. through a promise.

Something like the opposite of the "flush" command, if you know what I mean

@MSNev
Copy link
Collaborator

MSNev commented Apr 23, 2020

Just to clarify, it sounds like your looking not just to "pause" sending of messages but also to wait until some specific point in time to "post process" all recorded/reported events so you can update them with in this case user details... Am I following the request correctly?

We have a feature planning to allow pausing / resuming the sending of event, however, this is really caching and batching previously reported events -- there is (currently) no option to re-decorate the events as this can and could lead to reporting incorrect data (from a timeline perspective at least)

@MSNev
Copy link
Collaborator

MSNev commented Oct 8, 2021

Based on no response to the above, I'm going to use this Issue as the issue for adding the mentioned "pause" and "resume" implementation. This will NOT provide the option to reprocess batched events, it will just be a straight forward don't send any requests and start sending requests.

@MSNev MSNev self-assigned this Oct 8, 2021
MSNev added a commit that referenced this issue Oct 8, 2021
- Pause sending events via `appInsights.getSender().pause();
- Resume sending events via `appInsights.getSender().resume();
@MSNev MSNev added this to the 2.x.x (Future Release) milestone Oct 8, 2021
MSNev added a commit that referenced this issue Oct 8, 2021
- Pause sending events via `appInsights.getSender().pause();
- Resume sending events via `appInsights.getSender().resume();
MSNev added a commit that referenced this issue Oct 12, 2021
- Pause sending events via `appInsights.getSender().pause();
- Resume sending events via `appInsights.getSender().resume();
@MSNev MSNev added the fixed - waiting release PR Committed and waiting deployment label Oct 12, 2021
@MSNev MSNev closed this as completed Nov 10, 2021
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants