Skip to content

Conversation

@jkodumal
Copy link
Contributor

@jkodumal jkodumal commented Sep 14, 2016

This adds the all_flags method to the JS client. Unlike the server-side all_flags method, I've chosen to have this send analytics events.

The server-side use case is to bootstrap flags, so it doesn't necessarily make sense to send events there. Here, I think there's a stronger argument for sending the events. We might possibly want to make it an option, though?

src/index.js Outdated
return value;
}

function all_flags() {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use allFlags which is more common in JS-land.

@apucacao
Copy link
Contributor

apucacao commented Sep 14, 2016

Can you explain why we decided not to always send events when calling all_flags?

Also, in the server-side use case, when you say bootstrap, do you mean bootstrapping a client?

@jkodumal
Copy link
Contributor Author

I think you mis-read-- we always send events when calling all_flags here. In the server side case, yes-- bootstrapping a client is the most common use case. In that scenario, we don't want to send events for every feature flag.

@apucacao
Copy link
Contributor

I was wondering why we didn't send events when calling all_flags on the server side.

@jkodumal
Copy link
Contributor Author

I think in the future we'll provide it as an option, but at the moment, if your only goal is to bootstrap the client-side JS, you don't want to trigger flag requests for every flag simply by bootstrapping.

@apucacao
Copy link
Contributor

lgtm

@jkodumal jkodumal merged commit 608f05a into master Sep 14, 2016
@jkodumal jkodumal deleted the jko/all-flags branch September 14, 2016 17:54
apucacao pushed a commit that referenced this pull request Jan 19, 2018
…rface-for-the-javascript

[CH3359] Add Promise support for client initialization
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.

3 participants