TreeGateway / tree-gateway

This is a full featured and free API Gateway
http://treegateway.com
MIT License
188 stars 42 forks source link

Some examples of monitoring please. #152

Open sanguohot opened 6 years ago

sanguohot commented 6 years ago

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

thiagobustamante commented 6 years ago

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.

sanguohot commented 6 years ago

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

thiagobustamante commented 6 years ago

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

sanguohot commented 6 years ago

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