steemit / steem

The blockchain for Smart Media Tokens (SMTs) and decentralized applications.
https://steem.com
Other
1.95k stars 793 forks source link

Integrate a StatsD client #2276

Closed youkaicountry closed 6 years ago

youkaicountry commented 6 years ago

To lay groundwork for exporting metrics from steemd, a StatsD protocol client should be identified and integrated.

User Stories

I am a developer that wants to time the execution of a critical function in steemd and send it to a statsd server so that I can optimize the function.

I am an admin that only wants to record API call counts.

I am an admin that wants to log statsd rather than send messages to a statsd client.

Requirements

Some candidates: https://github.com/talebook/statsd-client-cpp https://github.com/vthiery/cpp-statsd-client

mvandeberg commented 6 years ago

What is the motivation behind this issue? Adding this for the sake of adding it seems pretty low priority considering other backlog work.

youkaicountry commented 6 years ago

We're going to be incorporating metrics gathering into steemd, and it would be a good idea to at some point add a standardized way of exporting the data.

It may definitely end up being lower priority, depending on the estimate of amount of work of involved, or dropped if a better solution is identified.

sneak commented 6 years ago

I think the amount of work involved will be very low, and the benefit very high. The motivation is that it would give us much more fine-grained insight into how steemd is spending its time handling RPC requests, allowing us to predict failures or capacity issues and scale more intelligently, while not bloating our logs or burdening the blockchain team with significant additional work. :)

goldibex commented 6 years ago

https://github.com/vthiery/cpp-statsd-client

I think this one is wiser -- thread-safe, header-only

youkaicountry commented 6 years ago

Moving ahead with: https://github.com/vthiery/cpp-statsd-client

mvandeberg commented 6 years ago

I want to expand this user story to define requirements.

There are two users for the plugin. The developers running the application and the dev/admin wanting to record some subset of data. Some of the user stories that I have come up with.

I am a developer that wants to time the execution of a critical function in steemd and send it to a statsd server so that I can optimize the function.

I am an admin that only wants to record API call counts.

I am an admin that wants to log statsd rather than send messages to a statsd client.

From these stories I have concluded the plugin needs to meets the following requirements: