Problem
Trendyol's seller onboarding team monitors its microservices with Grafana dashboards, Kibana log alerts and New Relic alerts on error rate, throughput and transaction time. These tools show that errors rise, not who causes them. The team cannot tell a service defect from one user sending invalid requests. They also cannot see failed and succeeded requests inside a user session, or the error distribution per user and per endpoint.
Example from the article: the team needs to know whether a growing error rate comes from a service defect or from a user's inappropriate operations, and New Relic cannot say.
Solution in brief
A generic Spring filter logs every HTTP call, and each call becomes a click event with a user attached. The events go through Fluent Bit into Kafka, ksqlDB aggregates errors per user, and Elasticsearch plus Grafana show them.
Questions this case answers
- How to attribute a rise in service errors to specific users or sessions versus a real service fault when the monitoring tool only reports aggregate error rates
- How to turn raw request logs of many services into a user-level event stream without touching each service's code
- How to tell whether a rising API error rate is a service defect or a few users making invalid requests?
- How to see what happened to one user during a session: which calls failed and which succeeded?
Tools and methods
- Spring filter — runs on every HTTP request and records URI, method, executor user, response body and response code
- Fluent Bit — ships the filter's application log lines to a Kafka topic
- Apache Kafka — stores the raw call events without adding latency to the service
- ksqlDB — SQL stream processing that builds per-user and per-URI error tables
- Elasticsearch — data source for Grafana, filled by a Kafka sink connector
- Grafana — dashboards for errors per user, per status code and requests per session
Google or a one-time email code. No password.