sematext / spm-agent

SPM Agent Framework written in NodeJS
http://sematext.com/spm
Apache License 2.0
9 stars 1 forks source link

Send separate bulk requests for each token #8

Closed megastef closed 4 years ago

megastef commented 4 years ago

It is possible to use multiple app tokens. A bulk request would fail if one of the tokens is not valid. Separating the bulk requests for each token ensures that metrics with valid tokens are accepted by the receiver. Only bulk requests with invalid tokens would fail.

bsmid commented 4 years ago

A bulk request would fail if one of the tokens is not valid.

Hm... are you sure about this? Receivers are supposed to accept the data for valid tokens.

megastef commented 4 years ago

The assumption, that receiver would reject the whole bulk was wrong. Actually it reports 400 status code and an error message with the invalid token. Metrics with valid tokens are processed.

We are not merging the PR.