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

Add transmit option flag #736

Merged
merged 2 commits into from
Jul 2, 2019
Merged

Add transmit option flag #736

merged 2 commits into from
Jul 2, 2019

Conversation

waltjones
Copy link
Contributor

To support SDK dev options, adds the transmit option, default true. Set to false to fully process events, but not send to Rollbar.

@@ -88,6 +88,9 @@ Queue.prototype.addItem = function(item, callback, originalError, originalItem)
}
this._maybeLog(item, originalError);
this.removePendingItem(originalItem);
if (!this.options.transmit) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This might be the right place, or perhaps this should go in _makeApiRequest - what do you think?
  • Looks like we are no longer calling the callback - is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This location is (I believe) after everything the caller would want to execute without sending the request. At entry of _makeApiRequest is logically equivalent. Any later would engage rate limiting. (And maybe that's desired? I'm not sure, but I thought not.)

I skipped the callback, since this case neither has a response nor produces an error. But it probably needs to be called in order for async/Promise wrappers to work correctly. I imagine other situations as well. I'll add it.

@waltjones waltjones merged commit 9fcca5c into master Jul 2, 2019
mudetroit pushed a commit that referenced this pull request Mar 14, 2024
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