Skip to main content
Version: 10.0

Metrics Reference

This page provides a complete reference of all metrics collected by webPDF. Metrics are organized by layer and component.

Metric names are given as they appear in the Prometheus output of the /metrics endpoint:

  • A metric with a base unit carries it at the end of its name, for example _seconds, _bytes, _threads or _tasks.
  • A timer and a distribution summary each provide the series <name>_count, <name>_sum and <name>_max; with percentiles enabled, they also provide the percentiles as series with the tag quantile.
  • The metrics of a request type appear only after its first request, for example the HTTP and API metrics.
  • The file descriptor metrics (process_files_*) are not available on Windows.

Application Information​

MetricTypeTagsUnitDescription
webpdfGaugeversion, version_date, beta-Constant metric with webPDF version metadata

Architecture Overview​

webPDF implements a 4-layer monitoring architecture:

note

The values for Duration and other measurements on this page are examples only.

HTTP Transport Layer​

Prefix: http_server
Measures: Complete HTTP request lifecycle including network I/O, authentication, CORS, and routing overhead

MetricTypeTagsUnitDescription
http_server_requests_secondsTimerendpoint, method, uri, statussecondsTotal HTTP request duration from network arrival to response
http_server_requests_activeGaugeendpoint, method, urirequestsCurrently active HTTP requests in processing
http_server_request_size_bytesDistributionSummaryendpoint, method, uribytesHTTP request body size
http_server_response_size_bytesDistributionSummaryendpoint, method, uri, statusbytesHTTP response body size
http_server_errors_client_totalCounterendpoint, method, urierrorsClient errors (4xx status codes)
http_server_errors_server_totalCounterendpoint, method, urierrorsServer errors (5xx status codes)

Example Tags:

  • endpoint: /rest/converter, /rest/pdfa, /soap/signature
  • method: GET, POST, PUT, DELETE
  • uri: /rest/converter, /rest/pdfa/{id}
  • status: 200, 400, 401, 500

REST API Layer​

Prefix: api_operation
Measures: Jersey REST endpoint execution including request deserialization, resource method invocation, and response serialization (excludes auth/CORS overhead)

MetricTypeTagsUnitDescription
api_operation_duration_secondsTimerendpoint, operationsecondsREST endpoint processing time

Example Tags:

  • endpoint: ConverterResource, PdfaResource, SignatureResource
  • operation: convert, validatePdfa, signDocument

Business Logic Layer​

Prefix: service_method
Measures: Execution of business logic (web service operations) including processing time, request count, and errors (excludes Jersey overhead)

MetricTypeTagsUnitDescription
service_method_duration_secondsTimermethodsecondsService operation duration from worker submission to response
service_method_requests_totalCountermethodrequestsTotal number of service requests executed
service_method_errors_totalCountermethoderrorsTotal number of service execution errors

Method Tag Values:

  • converter - Document conversion (Office, images, etc.)
  • pdfa - PDF/A conversion and validation
  • signature - Digital signatures
  • barcode - Barcode generation and recognition
  • ocr - Optical character recognition
  • toolbox - PDF manipulation operations
  • urlconverter - URL to PDF conversion

Thread Pool Layer​

Prefix: threadpool
Measures: Thread pool utilization, queue depth, and worker lifecycle metrics (live gauges, no timing)

MetricTypeTagsUnitDescription
threadpool_active_threadsGaugepoolthreadsCurrently executing worker threads
threadpool_pool_size_threadsGaugepoolthreadsConfigured maximum thread pool capacity
threadpool_largest_pool_size_threadsGaugepoolthreadsPeak number of concurrent threads observed
threadpool_completed_tasks_totalCounterpooltasksTotal number of completed worker tasks (since webPDF 10.0.7; up to 10.0.6 the gauge threadpool_completed_total_tasks)
threadpool_rejected_tasks_totalCounterpooltasksTasks rejected due to full queue ⚠️ (since webPDF 10.0.7; up to 10.0.6 the gauge threadpool_rejected_total_tasks)
threadpool_queue_size_tasksGaugepooltasksCurrent number of tasks waiting in queue
threadpool_queue_remaining_capacity_tasksGaugepooltasksAvailable queue slots for new tasks
threadpool_queue_capacity_tasksGaugepooltasksMaximum configured queue capacity

Pool Tag Values:

  • converter, pdfa, barcode, ocr, signature, toolbox, urlconverter

Queue Monitoring:

queue_size = 0 → No backlog, immediate processing
queue_size > 0 → Workers waiting, potential latency
queue_size == capacity → Queue full, next submit will reject!
rejected_total > 0 → CRITICAL: System overload, scale up required
Critical Alert

threadpool_rejected_tasks_total > 0 indicates queue overflow and request rejection (503 errors). Immediate action required: scale up or investigate bottleneck.

Event Pipeline Metrics​

Prefix: event_consumer, event_writer, dlq
Measures: Event processing and dead letter queue operations

Event Consumer Metrics​

MetricTypeTagsUnitDescription
event_consumer_read_batches_totalCounter-batchesTotal consumer readGroup batches
event_consumer_read_messages_totalCounter-messagesTotal messages returned by consumer readGroup
event_consumer_messages_totalCounteroutcomemessagesEvent consumer outcomes by result class
event_consumer_file_storage_delete_totalCounterresultoperationsFile storage deletion results in event consumer
event_consumer_errors_totalCountertypeerrorsConsumer loop errors by type

Outcome Tag Values:

  • processed - Successfully processed
  • retried - Temporary failure, retry scheduled
  • acked_invalid - Invalid message acknowledged
  • dlq - Moved to dead letter queue
  • max_deliveries - Maximum delivery attempts reached

File Storage Result Tag Values:

  • success - File deleted successfully
  • retryable_failure - Temporary failure, will retry
  • permanent_failure - Permanent failure, cannot delete
  • skipped_non_cloud - Skipped, because the file storage cannot remove the files of a session (none of the file storages of webPDF Server)

Error Type Tag Values:

  • redis_connection - Redis connection error
  • redis_timeout - Redis operation timeout
  • redis_exception - Other Redis exception
  • unexpected - Unexpected error

Event Writer Metrics​

MetricTypeTagsUnitDescription
event_writer_queue_sizeGauge-eventsDeletion events of this node that wait in the queue of the event writer. At the queue limit (default 10,000), logouts and document deletions wait until their event is written; see Deletion of Expired and Logged-Out Sessions

Dead Letter Queue (DLQ) Metrics​

MetricTypeTagsUnitDescription
dlq_published_totalCounteroriginentriesDLQ publications by origin
dlq_reprocess_claimed_totalCounter-entriesTotal claimed replay entries
dlq_reprocess_result_totalCounterresultoperationsDLQ replay outcomes
dlq_lineage_blocked_on_publish_totalCounter-operationsDLQ publish operations blocked by lineage protection
dlq_archive_failures_totalCountersinkoperationsDLQ archive failures by sink type
dlq_reprocess_cleanup_removed_totalCounter-entriesRemoved DLQ entries during retention cleanup
dlq_store_entriesGaugestatusentriesCurrent replay store entries by status
dlq_store_blocked_lineagesGauge-lineagesCurrent number of permanently blocked replay lineages
dlq_store_oldest_pending_age_secondsGauge-secondsAge of oldest pending DLQ entry

Origin Tag Values:

  • event_writer - Published by event writer
  • event_consumer - Published by event consumer

Reprocess Result Tag Values:

  • succeeded - Reprocessing succeeded
  • retry - Temporary failure, retry scheduled
  • permanent_failed - Permanent failure
  • skipped_blocked_lineage - Reprocessing skipped because the entry belongs to a blocked lineage

Archive Sink Tag Values:

  • best_effort - Best-effort archive sink
  • local_mandatory - Local mandatory archive sink

Store Status Tag Values:

  • pending - Waiting for reprocessing
  • processing - Currently being reprocessed
  • succeeded - Reprocessing succeeded
  • failed_permanent - Permanent failure

Session Metrics​

Prefix: webpdf
Measures: Sessions that the session storage of webPDF Server holds

MetricTypeTagsUnitDescription
webpdf_sessionsGauge-sessionsNumber of sessions that the session storage holds, read once per session expiration interval (default 1 second). Since webPDF 10.0.7

The metric counts what the session storage keeps as a session, of every kind (login, external token, personal access token, share link):

  • With the local session storage, it counts the sessions that have not ended. A session that ended leaves the count at once, a session that only timed out with the next expiration run.
  • With Redis or Valkey, it counts the entries of the session index of the namespace of the installation. An ended session stays in the index until its deletion has removed it, normally a matter of seconds. A value that does not fall back although the load is low shows a deletion that stalls.

The value is NaN (unknown), not 0, before the first successful reading, while the cache server does not answer or is marked as down, and with a session storage that cannot count without blocking. The /metrics endpoint only returns the last value read and never queries the cache server itself. The reading is switched on together with the metric: while the metrics are disabled (the default), webPDF Server sends no additional command to Redis or Valkey.

In a cluster, every node reads the same shared session index, so every node reports the same value (apart from the reading time). Evaluate the metric with max() or per instance and do not sum it over the nodes.

Document Metrics​

Prefix: webpdf_documents
Measures: Documents that webPDF Server holds across all sessions of the installation

Experimental

The document metrics are experimental and off by default. While they are off, no counting runs, the metrics below do not exist and webPDF Server sends no additional command to Redis or Valkey. They require that the metrics and an export (for example the Prometheus registry) are enabled.

MetricTypeTagsUnitDescription
webpdf_documentsGauge-documentsNumber of documents of the installation at the last successful count
webpdf_documents_sample_age_secondsGauge-secondsAge of the last successful count; NaN before the first one
webpdf_documents_sample_duration_secondsGauge-secondsDuration of the last count, whether it succeeded or was aborted

The metrics carry no tags except the common application tag.

The metric counts the entries of the document index of all sessions, that is documents including their history states. This is the same count as the column "Files" in the Admin Portal, summed over all sessions. With the local storage it is the size of the document table of the server. With Redis or Valkey (also Redis Cluster) the server scans the session indexes of the namespace of the installation and counts their entries; it only reads and changes nothing. With Redis or Valkey the value is an approximation, not a snapshot: documents change while the count runs, and a scan can report a session index twice (for example after a failover during the count). Do not alert on a single jump.

Environment Settings​

There is no element in application.xml and no setting in the Admin Portal. The settings are environment settings only:

Environment variableSystem propertyDefaultDescription
WEBPDF_METRICS_DOCUMENTS_ENABLEDwebpdf.metrics.documents.enabledfalseSwitches the document count on. Return to the default by setting it to false or removing it.
WEBPDF_METRICS_DOCUMENTS_INTERVALwebpdf.metrics.documents.interval60000Interval between two counts in milliseconds. The minimum is 1000; a smaller value is raised with a warning.
WEBPDF_METRICS_DOCUMENTS_TIME_LIMITwebpdf.metrics.documents.time.limit10000Time limit of one count in milliseconds. The minimum is 100, the maximum 3600000 (one hour); a value outside is corrected with a warning.

Behavior​

  • A separate background thread of each server counts at the configured interval, with a random offset so that the nodes of a cluster do not count at the same moment. The /metrics endpoint only returns the cached value and never queries the storage itself.
  • The value is NaN (unknown), never 0, before the first successful count, after an error, while the cache server cannot be reached and when the time limit is reached. In the last case the server writes one warning to the log that names the setting to raise.
  • When the cache server fails, the last value stays until the next count runs; that count fails and the value becomes NaN. webpdf_documents_sample_age_seconds keeps growing and shows how old the last successful count is.
  • In a cluster every node counts and reports the same value. Evaluate the metric with max() or per instance and do not sum it over the nodes.

Cost​

The duration of a count grows with the number of keys in Redis or Valkey. As a rough orientation only, measured on a developer machine with test containers: about 0.3 seconds for 200,000 documents and about 1.7 seconds for 1 million documents, without a measurable effect on response times. Real figures depend on the cache server, the network and the load.

If webPDF shares the Redis or Valkey server with large foreign data sets, a count can run beyond the time limit before it ends: a scan that finds no key of the installation cannot be interrupted. The result is then NaN. Use a Redis or Valkey server of its own for webPDF.

Cache Server Metrics​

Prefix: cache_server
Measures: Keys that the cache server (Redis or Valkey) of the storage providers deleted on its own

MetricTypeTagsUnitDescription
cache_server_evicted_keys_totalCounter-keysKeys that the masters of the cache server evicted since webPDF Server observes them, summed over all masters
cache_server_used_memory_bytesGauge-bytesMemory that the masters of the cache server use (used_memory), summed over all masters. Since webPDF 10.0.7
cache_server_max_memory_bytesGauge-bytesMemory limit of the masters of the cache server (maxmemory), summed over all masters; 0 if at least one master has no limit. Since webPDF 10.0.7

The metric exists only if a storage provider uses Redis or Valkey. It must stay 0: a rise means that the cache server deleted keys under memory pressure, among them possibly sessions, documents or locks of webPDF Server. The value rises only while the running memory check is active (WEBPDF_REDIS_MEMORY_CHECK_INTERVAL greater than 0), see Redis Server Configuration. Every server node reads the shared cache server itself and keeps its own count, so evaluate the metric per instance and do not sum it over the nodes.

The two memory metrics come from the same round of the running memory check as the evicted keys and are as old as its last round (every 60 seconds by default). They are NaN before the first round, when a master did not answer or its masters could not be determined, and while the running check is switched off (WEBPDF_REDIS_MEMORY_CHECK_INTERVAL of 0 or less). cache_server_max_memory_bytes of 0 means that a master has no limit; then the memory of the container or host limits it. used_memory is a little higher than the memory that Redis and Valkey compare with maxmemory, so the ratio of the two values slightly overstates the usage. In a Redis Cluster a single master can be full before the sum is; the cluster status (GET /admin/cluster/status) shows every master. Every node reads the same cache server, so evaluate both metrics with max() or per instance and do not sum them over the nodes.

note

Metrics are experimental and disabled by default in this version, see Metrics and Monitoring. The ERROR line in the server log is the default signal for evicted keys.

JVM Metrics​

Prefix: jvm
Measures: Java Virtual Machine performance

Memory Metrics​

MetricTypeTagsUnitDescription
jvm_memory_used_bytesGaugearea, idbytesUsed memory by memory pool
jvm_memory_committed_bytesGaugearea, idbytesCommitted memory by memory pool
jvm_memory_max_bytesGaugearea, idbytesMaximum memory by memory pool

Area Tag Values: heap, nonheap
ID Tag Values: PS Eden Space, PS Old Gen, PS Survivor Space, Code Cache, Metaspace, etc.

Garbage Collection Metrics​

MetricTypeTagsUnitDescription
jvm_gc_pause_secondsTimeraction, causesecondsGarbage collection pause duration
jvm_gc_memory_allocated_bytes_totalCounter-bytesTotal memory allocated
jvm_gc_memory_promoted_bytes_totalCounter-bytesMemory promoted to old generation

Thread Metrics​

MetricTypeTagsUnitDescription
jvm_threads_live_threadsGauge-threadsCurrent live thread count
jvm_threads_daemon_threadsGauge-threadsCurrent daemon thread count
jvm_threads_peak_threadsGauge-threadsPeak live thread count
jvm_threads_states_threadsGaugestatethreadsCurrent thread count by state

State Tag Values: runnable, blocked, waiting, timed-waiting, new, terminated

Class Loader Metrics​

MetricTypeTagsUnitDescription
jvm_classes_loaded_classesGauge-classesCurrently loaded class count
jvm_classes_unloaded_classes_totalCounter-classesTotal unloaded class count

JVM Info Metrics​

MetricTypeTagsUnitDescription
jvm_infoGaugeruntime, vendor, version-Constant info metric with JVM runtime metadata

System Metrics​

Prefix: system, process
Measures: Operating system and process metrics

CPU Metrics​

MetricTypeTagsUnitDescription
system_cpu_usageGauge-ratio (0-1)System-wide CPU usage
system_cpu_countGauge-coresNumber of available processors
process_cpu_usageGauge-ratio (0-1)Process CPU usage

Uptime Metrics​

MetricTypeTagsUnitDescription
process_uptime_secondsGauge-secondsProcess uptime since start
process_start_time_secondsGauge-secondsProcess start time (Unix epoch)

Disk Space Metrics​

MetricTypeTagsUnitDescription
disk_free_bytesGaugepathbytesFree disk space on filesystem
disk_total_bytesGaugepathbytesTotal disk space on filesystem

File Descriptor Metrics​

MetricTypeTagsUnitDescription
process_files_open_filesGauge-filesCurrently open file descriptors
process_files_max_filesGauge-filesMaximum file descriptors

Log4j2 Metrics​

MetricTypeTagsUnitDescription
log4j2_events_totalCounterleveleventsLog events by level

Level Tag Values: trace, debug, info, warn, error, fatal

Tomcat Metrics​

Prefix: tomcat
Measures: The embedded Apache Tomcat: HTTP connectors, request processing per servlet and the resource cache. They count every HTTP request the server receives, including SOAP, the portal, static files and the /metrics endpoint itself, while the HTTP Transport Layer only sees the requests handled by the REST framework.
Enabled by: <systemMetrics enabled="true"/>

webPDF sessions are not Tomcat HTTP sessions, so there are no Tomcat session metrics. The sessions of webPDF Server are counted by webpdf_sessions, see Session Metrics. Up to webPDF 10.0.6, all Tomcat metrics carry the additional tag instance="tomcat"; Prometheus stores it as exported_instance, because instance is reserved for the scrape target. Since webPDF 10.0.7 they carry no tag of their own.

Connector Thread Metrics​

MetricTypeTagsUnitDescription
tomcat_threads_current_threadsGaugenamethreadsThreads in the thread pool of the connector
tomcat_threads_busy_threadsGaugenamethreadsThreads of the connector that are processing a request
tomcat_threads_config_max_threadsGaugenamethreadsConfigured maximum number of threads of the connector

Connection Metrics​

MetricTypeTagsUnitDescription
tomcat_connections_current_connectionsGaugenameconnectionsOpen connections of the connector
tomcat_connections_keepalive_current_connectionsGaugenameconnectionsOpen connections of the connector in keep-alive state
tomcat_connections_config_max_connectionsGaugenameconnectionsConfigured maximum number of connections of the connector

Request Metrics​

MetricTypeTagsUnitDescription
tomcat_global_request_secondsTimernamesecondsRequests processed by the connector (_count) and their total processing time (_sum)
tomcat_global_request_max_secondsGaugenamesecondsLongest processing time of a single request
tomcat_global_error_totalCounternamerequestsRequests answered with a status of 400 or higher
tomcat_global_received_bytes_totalCounternamebytesBytes received by the connector
tomcat_global_sent_bytes_totalCounternamebytesBytes sent by the connector

Name Tag: the connector, for example http-nio-8080 (depends on the connector configuration)

Servlet Metrics​

MetricTypeTagsUnitDescription
tomcat_servlet_request_secondsTimernamesecondsRequests of the servlet (_count) and their total processing time (_sum)
tomcat_servlet_request_max_secondsGaugenamesecondsLongest processing time of a single request of the servlet
tomcat_servlet_error_totalCounternamerequestsRequests of the servlet that ended with an error

Name Tag: the servlet, for example REST Services, SOAP Services, Metrics or default (static files)

Cache Metrics​

MetricTypeTagsUnitDescription
tomcat_cache_access_totalCounter-accessesLookups in the resource cache of the web application
tomcat_cache_hit_totalCounter-hitsLookups answered from the resource cache

Metric Correlation​

Understanding Performance Bottlenecks​

Compare metrics across layers to identify bottlenecks:

If api_operation_duration_seconds >> service_method_duration_seconds:

  • High serialization/deserialization overhead
  • Consider optimizing JSON parsing or reducing payload size

If service_method_duration_seconds >> threadpool_active_threads:

  • Workers are idle while business logic runs
  • Processing time dominated by external dependencies

If threadpool_queue_size_tasks > 0:

  • Requests waiting for available worker threads
  • service_method_duration_seconds increases due to queue wait time
  • Consider scaling up thread pool

Common Alert Patterns​

Queue Buildup:

threadpool_queue_size_tasks > 0
→ Requests waiting for worker threads
→ service_method_duration_seconds increases
→ Consider scaling thread pool

Thread Pool Saturation:

threadpool_active_threads == threadpool_pool_size_threads
→ All threads busy, new requests must queue
→ Scale up or investigate slow workers

System Overload (Critical):

threadpool_rejected_tasks_total > 0
→ Queue full, requests being rejected
→ http_server_errors_server_total increases (503)
→ IMMEDIATE ACTION REQUIRED

High Memory Usage:

jvm_memory_used_bytes{area="heap"} / jvm_memory_max_bytes{area="heap"} > 0.8
→ Memory pressure, possible GC thrashing
→ Review heap settings or optimize memory usage

DLQ Buildup:

dlq_store_entries{status="pending"} > 100
→ Many failed events waiting for reprocessing
→ Check event consumer errors

See Also​