-
Notifications
You must be signed in to change notification settings - Fork 791
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
feat(server): add tunnel time metric to opt-in server usage report #1551
Conversation
87800fa
to
8a911f0
Compare
6ed7585
to
5341e1a
Compare
cbf2e21
to
aa8f8f2
Compare
aa8f8f2
to
94c2219
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a different approach. I think much cleaner and addresses most of your comments I think. PTAL.
usage.push({country, inboundBytes, asn}); | ||
// Return both data bytes and tunnel time information with a single | ||
// Prometheus query, by using a custom "metric_type" label. | ||
const queryResponse = await this.prometheusClient.query(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is an ok solution, though I don't consider good practice to mix data of different types. Here we are creating a single time series with different units and meaning. And later split them again. I'd rather keep them as separate time series, as it's a lot clearer.
I also wonder if this approach affects performance somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fortuna Ok let me try something else. How about this?
No description provided.