tree-gateway icon indicating copy to clipboard operation
tree-gateway copied to clipboard

Some examples of monitoring please.

Open sanguohot opened this issue 7 years ago • 4 comments

Could not found in any docs. Any help from you will be greatly appreciated.

sanguohot avatar Jun 09 '18 08:06 sanguohot

Hi @sanguohot ,

It is possible to use any custom middleware to handle how your analytics data must be processed.

Tree gateway already includes a middleware that collect the log entries and store them into the redis database.

I recommend you to use this middleware and then configure logstash to collect from redis and send to your log server (I use elasticsearch).

To enable the redis middleware for the logs, just configure your gateway:

gateway:
    analytics:
        enabled: true
        logger:
            name: redis

You can found the docs here.

thiagobustamante avatar Jun 11 '18 02:06 thiagobustamante

Hi @thiagobustamante You are so kind. 3Q very much. Still one more question please, is this code production ready?

sanguohot avatar Jun 12 '18 01:06 sanguohot

Hi @sanguohot, I've been using it in production for months. Just remember to Set NODE_ENV to production and use some process manager like PM2.

[]s

thiagobustamante avatar Jun 12 '18 20:06 thiagobustamante

Hi @thiagobustamante Very good news for me. I will try to use it in a blockchain project.

sanguohot avatar Jun 14 '18 07:06 sanguohot