Search code examples
javaspringmetricsprometheus

Is the Prometheus Java Summary metric thread-safe?


Is the Prometheus Java Summary object thread-safe? If I declare it static in a class, it will be used by all instances of the class. Does Prometheus implement thread-safety for this metric object?


Solution

  • Prometheus client libraries take care of details like thread safety for direction instrumentation such as the Summary class.