{"id":13510418,"url":"https://github.com/xmlking/microservices-observability","last_synced_at":"2025-08-20T12:36:03.361Z","repository":{"id":142313692,"uuid":"104446236","full_name":"xmlking/microservices-observability","owner":"xmlking","description":"🎉 Microservices Observability - Log Aggregation, Distributed Tracking,  Metrics","archived":false,"fork":false,"pushed_at":"2017-12-26T02:15:26.000Z","size":474,"stargazers_count":41,"open_issues_count":0,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-01T10:35:22.682Z","etag":null,"topics":["grafana","influxdb","kafka","kafka-connect","kafka-ksql","kotlin","micrometer","microservices","observability","opentracing","prometheus","reactive-programming","spring-boot","spring5","webflux"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xmlking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-22T07:39:55.000Z","updated_at":"2024-07-23T19:14:52.000Z","dependencies_parsed_at":"2024-01-13T19:26:50.242Z","dependency_job_id":"d39eee44-3cbd-4351-9483-faf9ce59d93e","html_url":"https://github.com/xmlking/microservices-observability","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicroservices-observability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicroservices-observability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicroservices-observability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fmicroservices-observability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmlking","download_url":"https://codeload.github.com/xmlking/microservices-observability/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227802821,"owners_count":17822113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grafana","influxdb","kafka","kafka-connect","kafka-ksql","kotlin","micrometer","microservices","observability","opentracing","prometheus","reactive-programming","spring-boot","spring5","webflux"],"created_at":"2024-08-01T02:01:38.155Z","updated_at":"2024-12-02T21:12:40.905Z","avatar_url":"https://github.com/xmlking.png","language":"Kotlin","readme":"[![Build Status](https://travis-ci.org/xmlking/microservices-observability.svg?branch=master)](https://travis-ci.org/xmlking/microservices-observability)\n[![codecov.io](https://codecov.io/github/xmlking/microservices-observability/coverage.svg?branch=master)](https://codecov.io/github/xmlking/microservices-observability?branch=master)\n[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/xmlking/microservices-observability/blob/master/LICENSE)\n[![Join the chat at https://gitter.im/xmlking/microservices-observability](https://badges.gitter.im/xmlking/microservices-observability.svg)](https://gitter.im/xmlking/microservices-observability?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nmicroservices-observability\n===========================\nAs Developers are migrating from **Monolithic** architecture to distributed **microservices** and **Service Mesh**, troubleshooting production issues become difficult.\n\nThis sample application showcases patterns to implement better **Observability** at web scale.\n\n![Reactive](./docs/microservices-observability.png \"Microservices Observability\")\n\n#### Log Aggregation \n\n![Reactive](./docs/microservices-observability.gif \"Microservices Observability\")\n\n#### Highlights\n* Ready to go docker configuration for set up **GILK** logging stack in a minutes.\n    * **GILK** - **G**rafana , **I**nfluxDB, **L**ogstash json format, **K**afka\n* Monitoring solution for docker hosts and containers with [Prometheus](https://prometheus.io/), [Grafana](http://grafana.org/), [cAdvisor](https://github.com/google/cadvisor), \n[NodeExporter](https://github.com/prometheus/node_exporter) and alerting with [AlertManager](https://github.com/prometheus/alertmanager).\n* Vendor-neutral instrumentation\n    * Log Aggregation - SLF4J\n    * Distributed Tracking - [OpenTracing](http://opentracing.io/)\n    * Application Metrics - [MicroMeter](http://micrometer.io/)\n* end-to-end `Functional Reactive Programming (FRP)` with Spring 5.\n* Multi-project builds with Gradle Kotlin Script. \n* Spring [Kotlin Support](https://docs.spring.io/spring-framework/docs/5.0.x/spring-framework-reference/kotlin.html)\n* Docker deployment\n\n### Prerequisites\n1. Gradle 4.4 (Install via [sdkman](http://sdkman.io/))\n2. Docker for Mac [Setup Instructions](./docs/docker.md)\n\n### Build\n```bash\n# build all 3 executable jars\ngradle build\n# continuous build with `-t`. \n# this shoud be started before any run tasks i.e., `gradle ui-app:bootRun`, for spring's devtools to work.\ngradle build -x test -t\n# build all 3 apps\ngradle build -x test\n# build all 3 docker images\ngradle docker -x test\n```\n\n### Test\n```bash\ngradle test\n```\n\n### Run\n##### Manual \n```bash\n# start infra services\ndocker-compose  -f docker-compose-infra.yml up cassandra\ndocker-compose  -f docker-compose-infra.yml up kafka\ndocker-compose  -f docker-compose-infra.yml up influxdb\n```\nStart all 4 apps with `gradle xyz:bootRun` : [cassandra-data-service](./cassandra-data-service/), [stream-service](./stream-service/), [ui-app](./ui-app/) , [kafka-influxdb-service](./kafka-influxdb-service/)\n\u003e If you want to debug the app, add --debug-jvm parameter to Gradle command line\n\n##### Docker\nYou can also build Docker images and run all via `Docker Compose`\n```bash\n# start containers in the background\ndocker-compose up -d\n# start containers in the foreground\ndocker-compose up \n# show runnning containers \ndocker-compose ps\n# scaling containers and load balancing\ndocker-compose scale stream=2\n# 1. stop the running containers using\ndocker-compose stop\n# 2. remove the stopped containers using\ndocker-compose rm -f\n# just start only infra services\ndocker-compose  -f docker-compose-infra.yml up\n# connect(ssh) to a service and run a command\ndocker-compose exec cassandra cqlsh\n# see logs of a service \ndocker-compose logs -f stream\n# restart single service\ndocker-compose restart stream\n# start single service\ndocker-compose -f docker-compose-infra.yml up cassandra\ndocker-compose -f docker-compose-infra.yml up kafka\ndocker-compose -f docker-compose-infra.yml up influxdb\n# check health for a service\ndocker inspect --format \"{{json .State.Health.Status }}\" microservicesobservability_app_1\ndocker ps\ndocker-compose -f docker-compose-fluentd.yml up\n```\n\u003e Access UI App at http://localhost:8080\n\n\u003e Prometheus http://localhost:9090/graph\n\n\u003e InfluxDB http://localhost:8083\n\n\u003e Grafana http://localhost:1634\n\n### Gradle Commands\n```bash\n# upgrade project gradle version\ngradle wrapper --gradle-version 4.4.1 --distribution-type all\n# gradle daemon status \ngradle --status\ngradle --stop\n# refresh dependencies\ngradle build -x test --refresh-dependencies \n```\n\n### Reference \n* Reactive Spring and Kotlin-based Application\n    * https://github.com/johnsonr/flux-flix-service\n","funding_links":[],"categories":["Kotlin","spring-boot"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fmicroservices-observability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmlking%2Fmicroservices-observability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fmicroservices-observability/lists"}