Submitted:
09 November 2025
Posted:
11 November 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. The Problem
3. Objectives
4. Related Work
4.1. Metrics Collection
4.2. Centralized Logging
4.3. Distributed Tracing
4.4. OpenTelemetry Integration
5. System Design
5.1. Overview
5.2. Aspect-Oriented Programming
5.3. Class Structure
5.4. The Metrics Reporter
5.5. Caching Statistics
6. Exporters
6.1. Apache Kafka Exporter
6.1.1. Overview and Architecture
- A single partition may only be consumed by one consumer within a group.
- Events within a partition are strictly ordered, and no guarantees exist across partitions.
- Flexibility: Users can define message formats and decide how to process consumed events—either through custom software or integrations like Apache Flink.
- Performance: Kafka demonstrates high throughput and low latency [36], making it suitable for high-frequency metric reporting.
- Widespread Adoption: Kafka is used by over 80% of Fortune 100 companies, which facilitates adoption and integration in existing infrastructures [37].
6.1.2. Implementation
- Register the KafkaExporter as a Spring-managed bean.
-
Define configuration properties:
- ○
- kafka.monitoring.bootstrap.servers: the Kafka bootstrap server addresses.
- ○
- kafka.monitoring.topic: the topic to which metrics are published.
6.1.3. Experimental Setup
6.2. Prometheus Exporter
6.2.1. Overview and Architecture
- Prometheus Server: It is the central component with the time-series database and HTTP scraping service.
- Alertmanager: Manages alert routing and notifications based on PromQL queries.
- Web UI: Provides interactive data exploration.
- Pushgateway (optional): Allows short-lived services to expose metrics, though its use is discouraged by the Prometheus maintainers [39].
6.2.2. Implementation
- Gauge: Captures the latest value at the time of a scrape, suitable for instantaneous measurements but susceptible to missing outliers.
- Histogram: Aggregates values into configurable buckets and stores cumulative counts and sums. Histograms are best used for the analysis of execution durations.
6.2.3. Experimental Setup
- Two heatmaps showing the evolution of request time distributions.
- A comparative panel for the two test instances.
- A liveliness monitor for service availability.
6.3. RabbitMQ Exporter
6.3.1. Architectural Overview
- Direct exchanges perform exact routing based on the routing key of the message.
- Topic exchanges enable pattern-based routing, providing flexible matching of routing keys.
- Fanout exchanges disregard the routing key entirely and broadcast messages to all bound queues.
- Headers exchanges route messages based on the attributes in the message headers instead of the routing keys.
6.3.2. Implementation Details
- metrics.rabbitmq.exchange It specifies the name of the exchange to which metric messages are dispatched.
- metrics.rabbitmq.routingKey: It specifies the routing key accompanying each message.
- These parameters ensure precise and flexible routing of performance metrics within the messaging infrastructure of RabbitMQ.
6.3.3. Experimental Setup
6.4. SQL Exporter
6.4.1. Theoretical Background
6.4.2. Performance Optimization Strategies
6.4.3. Implementation Details
6.4.4. Test Setup
6.5. Cassandra Exporter
6.5.1. Background and Characteristics
6.5.2. Implementation Details
- cassandra.contact.point (Cassandra host),
- cassandra.port (port number),
- cassandra.keyspace (Cassandra keyspace name),
- cassandra.exporter.table (metrics table name), and
- INSTANCE_NAME (application instance identifier).
6.5.3. Test Setup
7. Testing
7.1. Test Application
7.2. Measurement Accuracy
- 2 ms reference: mean reported time = 2.9 ms
- 20 ms reference: mean reported time = 21.5 ms
- 200 ms reference: mean reported time = 202.1 ms
7.3. Impact on Throughput
- Without instrumentation: 111,900 ms
- With synchronous reporter: 112,126 ms
- With asynchronous reporter: 111,266 ms
7.4. Resource Consumption
7.4.1. Worst-Case Resource Utilization
7.4.2. Per-Exporter Resource Profiling
8. Addressing the Limitations of a Single-Threaded Exporter


9. Conclusions and Future Directions
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Why do we use Node.JS at Bolt. Available online: https://bolt.eu/en/blog/why-we-use-node-js/ (accessed on October 1st 2025).
- Observability Survey 2023. Available online: https://grafana.com/observability-survey/2023/ (accessed on October 1st 2025).
- Observability Survey 2024. Available online: https://grafana.com/observability-survey/2024/ (accessed on October 1st 2025).
- Observability Survey 2025. Available online: https://grafana.com/observability-survey/2025/ (accessed on October 1st 2025).
- Anghel, I.I.; Calin, R.S.; Nedelea, M.L.; Stanica, I.C.; Tudose, C.; Boiangiu, C.A. Software development methodologies: A comparative analysis. UPB Sci. Bull. 2022, 83, 45–58. [Google Scholar]
- Bloch, J. Effective Java; Addison-Wesley: Boston, MA; 2018.
- Spring Framework Overview. Available online: https://spring.io/why-spring (accessed on October 1st 2025).
- Prometheus Overview. Available online: https://prometheus.io/docs/introduction/overview/ (accessed on October 1st 2025).
- Graphite Overview. Available online: https://graphiteapp.org/#overview (accessed on October 1st 2025).
- Apache Kafka Introduction. Available online: https://kafka.apache.org/intro (accessed on October 1st 2025).
- RabbitMQ Introduction. Available online: https://www.rabbitmq.com (accessed on October 1st 2025).
- Loki Architecture. Available online: https://grafana.com/oss/loki/ (accessed on October 1st 2025).
- Alhosban, A.; Pesingu, S.; Kalyanam, K. CVL: A Cloud Vendor Lock-In Prediction Framework. Mathematics, Basel, 2024, 12(3), 387.
- Java SE Support Roadmap. Available online: https://www.oracle.com/java/technologies/java-se-support-roadmap.html (accessed on October 1st 2025).
- A Java 17 and Jakarta EE 9 baseline for Spring Framework 6. Available online: https://spring.io/blog/2021/09/02/a-java-17-and-jakarta-ee-9-baseline-for-spring-framework-6 (accessed on October 1st 2025).
- Jar Files. Available online: https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jarGuide.html (accessed on October 1st 2025).
- Maven Overview. Available online: https://maven.apache.org/what-is-maven.html (accessed on October 1st 2025).
- Gradle Overview. Available online: https://docs.gradle.org/current/userguide/userguide.html (accessed on October 1st 2025).
- Dependency Injection. Available online: https://docs.spring.io/spring-framework/reference/core/beans/dependencies/factory-collaborators.html (accessed on October 1st 2025).
- Kiczales, G.; Lamping, J.; Mendhekar, A.; Maeda, C., Lopes, C.V.; Loingtier, J.M.; Irwin J. Aspect-oriented programming. ECOOP’97 — Object-Oriented Programming. ECOOP 1997. Lecture Notes in Computer Science, vol 1241. Springer, Berlin, Heidelberg.
- Spring AOP. Available online: https://docs.spring.io/spring-framework/reference/core/aop.html (accessed on October 1st 2025).
- Laddad, R. (2010). AspectJ in Action: Enterprise AOP with Spring Applications (2nd ed.). Manning; New York, NY, USA, 2024.
- AspectJ Semantics Introduction. Available online: https://eclipse.dev/aspectj/doc/released/progguide/semantics.html#semantics-intro (accessed on October 1st 2025).
- Load-Time Weaving. Available online: https://eclipse.dev/aspectj/doc/released/devguide/ltw.html (accessed on October 1st 2025).
- AOP Goals. Available online: https://docs.spring.io/spring-framework/reference/core/aop/introduction-spring-defn.html (accessed on October 1st 2025).
- AspectJ Support. Available online: https://docs.spring.io/spring-framework/reference/core/aop/ataspectj.html (accessed on October 1st 2025).
- AOP Documentation - Proxies. Available online: https://docs.spring.io/spring-framework/reference/core/aop/proxying.html (accessed on October 1st 2025).
- Kleppmann, M. Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems. O’Reilly; 2018.
- System Javadoc. Available online: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/System.html (accessed on October 1st 2025).
- ConcurrentHashMap Javadoc. Available online: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ConcurrentHashMap.html#%3Cinit%3E() (accessed on October 1st 2025).
- Executors. Available online: https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/Executors.html (accessed on October 1st 2025).
- Spring Doc - DisposableBean. Available online: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/DisposableBean.html (accessed on October 1st 2025).
- What is Event Streaming. Available online: https://www.confluent.io/learn/event-streaming/ (accessed on October 1st 2025).
- Apache Kafka Introduction. Available online: https://kafka.apache.org/intro (accessed on October 1st 2025).
- Kafka Partitioning Keys. Available online: https://www.confluent.io/learn/kafka-partition-key/ (accessed on October 1st 2025).
- Wu H.; Shang Z.; & Wolter, K. Performance Prediction for the Apache Kafka Messaging System. 2019 IEEE 21st International Conference on High Performance Computing and Communications.
- Companies Using Kafka. Available online: https://kafka.apache.org/powered-by (accessed on October 1st 2025).
- Querying Prometheus. Available online: https://prometheus.io/docs/prometheus/latest/querying/basics/ (accessed on October 1st 2025).
- When to Use Pushgateway. Available: https://prometheus.io/docs/practices/pushing/ (accessed on October 1st 2025).
- Prometheus Metric Types. Available online: https://prometheus.io/docs/concepts/metric_types/ (accessed on October 1st 2025).
- OASIS Advanced Message Queuing Protocol (AMQP) Version 1.0 Part 0: Overview. https://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-overview-v1.0-os.html (accessed on October 1st 2025).
- RabbitMQ Consumers. Available online: https://www.rabbitmq.com/tutorials/amqp-concepts#consumers (accessed on October 1st 2025).
- Codd E.F. A Relational Model of Data for Large Shared Data Banks. Communications of the ACM, 1970, 13 (6), 377-387.
- Grippa, V.; Kuzmichev, S. Learning MySQL: Get a Handle on Your Data, 2nd ed.; O’Reilly Media: Sebastopol, CA, USA, 2021. [Google Scholar]
- O’Hearn, S. OCA Oracle Database SQL Exam Guide (Exam 1Z0-071) (Oracle Press); McGraw Hill: New York, NY, USA, 2017. [Google Scholar]
- Kirshteyn, M. Mastering SQL Server Database Administration. A Comprehensive Guide to Perfection and Productivity; Independently Published, 2024.
- Ferrari, L.; Pirozzi, E. Learn PostgreSQL: Use, Manage, and Build Secure and Scalable Databases with PostgreSQL 16, 2nd ed.; Packt Publishing: Birmingham, UK, 2023. [Google Scholar]
- Information Technology — Database Languages SQL. Available on;ine: https://www.iso.org/standard/76583.html (accessed on October 1st 2025).
- Java JDBC API. Available online: https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/ (accessed on October 1st 2025).
- Sadeghian, A.; Zamani, M.; Abdullah, S. M. A Taxonomy of SQL Injection Attacks 2013 International Conference on Informatics and Creative Multimedia, Kuala Lumpur, Malaysia, 2013, 269-273.
- Fowler, M. Patterns of Enterprise Application Architecture; Addison-Wesley Professional: Boston, MA, USA, 2002. [Google Scholar]
- Jakarta Persistence API Reference. Available online: https://jakarta.ee/specifications/persistence/3.2/ (accessed on October 1st 2025).
- Mihalcea, V. High-Performance Java Persistence; Self-Published: Cluj-Napoca, Romania, 2019. [Google Scholar]
- Paterno, G. NoSQL Tutorial: A comprehensive look at the NoSQL database Linux Journal 1999, 67, 2-es.
- Chauhan, A. A review on various aspects of MongoDB databases. International Journal of Engineering Research & Technology (IJERT), 2019, 8(5), 90-92.
- Carlson, J. Redis in Action Manning; New York, NY, USA, 2013.
- Fitzpatrick, B. Distributed Caching with Memcached Linux Journal 2004, 124, 5.
- Guia, J; Soares, V. G.; Bernardino, J. Graph Databases: Neo4j analysis. In Proceedings of the 19th International Conference on Enterprise Information Systems (ICEIS 2017) - Volume 1, pages 351-356.
- Buna, S. GraphQL in Action Manning; New York, NY, USA, 2021.
- Carpenter, J.; Hewitt, E. Cassandra: The Definitive Guide, Distributed Data at Web Scale, 3rd ed.; O’Reilly Media: Sebastopol, CA, USA, 2022. [Google Scholar]
- Lee, E. A.; Bateni, S.; Lin, S.; Lohstroh, M.; Menard, C. Quantifying and generalizing the CAP theorem . Available online: https://arxiv.org/abs/2109.07771 (accessed on October 1st 2025).
- Spring Boot Overview. Available online: https://docs.spring.io/spring-boot/index.html (accessed on October 1st 2025).
- Docker Compose. Available online: https://docs.docker.com/compose/ (accessed on October 1st 2025).
- Thread Class. Available online: https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html (accessed on October 1st 2025).
- Beronić, D., Pufek, P., Mihaljević, B., & Radovan, A. (2021, September). On Analyzing Virtual Threads–a Structured Concurrency Model for Scalable Applications on the JVM. In 2021 44th International Convention on Information, Communication and Electronic Technology (MIPRO).











| db.metrics.table | ||
| Operation_name | text | Not null |
| Execution_ns | numeric | Not null |
| instance | text | Not null |
| [additional columns] | [column type] | [constraints] |
| 400 ms | 40 ms | |
| Logger | 1,5% | 3% |
| Kafka | 0,6% | 4,4% |
| Prometheus | 0,65% | 1,1% |
| RabbitMQ | 0,9% | 1,4% |
| SQL | 1,5% | 2,8% |
| Cassandra | 0,7% | 3,3% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).