dabs
dabs

Reputation: 747

Logging in microservices

assume we've got a number of Web API microservices, and they are written in different languages/framworks (some are ASP.NET Web API, some are NodeJS, some are Flask etc.).

I would like to log every request made to any service, and I would prefer a centralized log.

What method/tools should I use?

Regards, Daníel

Upvotes: 5

Views: 3046

Answers (3)

Burak savurur
Burak savurur

Reputation: 29

If your logs get bigger (like in the terabytes level) you will need a big data solution. I would suggest Apache Hadoop with Apache Flume and Elasticsearch. Periodically collect the newest log data and pump it into Elasticsearch, via a Flume agent feed into HDFS or HBase with log data.

Upvotes: 1

Gang Gao
Gang Gao

Reputation: 1079

Effectively you can use any language / logging work framework. All you need to do is to introduce one more service, the logging service to your family of services. All your services publish the logs to service bus which sequentially route the logs to the logging service for persistence.

Upvotes: 1

jfcorugedo
jfcorugedo

Reputation: 10051

There is a very famous approach called ELK:

  • Elasticsearch: Search and analyse data in real time
  • Logstash: Collect, parse and enrich data from each machine
  • Kibana: Explore and visualise your data graphically

So all the information is collected by Logstash, stored in Elasticsearch and visualised using Kibana UI.

With this stack no matters who is generating the information (or what technology is using).

Upvotes: 6

Related Questions