Tagged articles
2 articles
Page 1 of 1
JD Cloud Developers
JD Cloud Developers
Dec 27, 2024 · Backend Development

How to Implement Cross-Thread Log Sampling in High-Throughput Java Services

Log volume can cripple high-throughput Java systems, especially during traffic spikes, so this article explores practical strategies for request-level log sampling, cross-thread trace propagation, and component-based APIs to balance observability with performance, including code examples and implementation considerations.

ThreadLocaljavalog sampling
0 likes · 8 min read
How to Implement Cross-Thread Log Sampling in High-Throughput Java Services
Architect
Architect
Apr 23, 2024 · Backend Development

Cross-Thread Log Sampling for High-Throughput Java Services

This article examines the performance impact of excessive logging in high-throughput Java services and presents three practical approaches—ThreadLocal-style wrappers, explicit flag propagation, and a decoupled component with an extensible API—to achieve cross-thread request-level log sampling while preserving traceability.

AsynchronousBackendThreadLocal
0 likes · 9 min read
Cross-Thread Log Sampling for High-Throughput Java Services