Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Conversation

@msiebuhr
Copy link
Contributor

@msiebuhr msiebuhr commented Jan 29, 2018

First take at adding statsd-metrics to streaming server.

Reference to PR on the "old" server: #11

@coveralls
Copy link

coveralls commented Jan 29, 2018

Coverage Status

Coverage decreased (-0.5%) to 92.536% when pulling bd5d1e7 on tactileentertainment:msiebuhr/add-statsd-to-stream-refactor into ed50fab on Unity-Technologies:feature/streams-refactor.

Copy link
Contributor

@stephen-palmer stephen-palmer left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution - I'm agreeable to adding statsd support but there's some work to do yet:

I don't like that there is no execution path without statsd, which will by far be the most common use case. An alternative design to consider would be to add events to the remaining command handlers (_onTransactionEnd already emits an event, for instance) and then setup an event listener object that consolidates all of the statsd logic, which will only be registered if statsd is enabled.

Also, this will need test coverage before being accepted. (except for main.js which doesn't really have tests)

throw new Error("Invalid transaction isolation");
}

if (this.transactionTimer) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be moved after the 'await' on endPutTransaction below.

let server = null;

let cacheOpts = {};
let cacheOpts = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why pass the statsd object to the cache init() if it isn't used in the cache module?

@stephen-palmer
Copy link
Contributor

Closing due to inactivity.

@msiebuhr msiebuhr deleted the msiebuhr/add-statsd-to-stream-refactor branch March 15, 2018 07:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants