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,_threadsor_tasks. - A timer and a distribution summary each provide the series
<name>_count,<name>_sumand<name>_max; with percentiles enabled, they also provide the percentiles as series with the tagquantile. - 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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
webpdf | Gauge | version, version_date, beta | - | Constant metric with webPDF version metadata |
Architecture Overview
webPDF implements a 4-layer monitoring architecture:
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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
http_server_requests_seconds | Timer | endpoint, method, uri, status | seconds | Total HTTP request duration from network arrival to response |
http_server_requests_active | Gauge | endpoint, method, uri | requests | Currently active HTTP requests in processing |
http_server_request_size_bytes | DistributionSummary | endpoint, method, uri | bytes | HTTP request body size |
http_server_response_size_bytes | DistributionSummary | endpoint, method, uri, status | bytes | HTTP response body size |
http_server_errors_client_total | Counter | endpoint, method, uri | errors | Client errors (4xx status codes) |
http_server_errors_server_total | Counter | endpoint, method, uri | errors | Server errors (5xx status codes) |
Example Tags:
endpoint:/rest/converter,/rest/pdfa,/soap/signaturemethod:GET,POST,PUT,DELETEuri:/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)
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
api_operation_duration_seconds | Timer | endpoint, operation | seconds | REST endpoint processing time |
Example Tags:
endpoint:ConverterResource,PdfaResource,SignatureResourceoperation: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)
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
service_method_duration_seconds | Timer | method | seconds | Service operation duration from worker submission to response |
service_method_requests_total | Counter | method | requests | Total number of service requests executed |
service_method_errors_total | Counter | method | errors | Total number of service execution errors |
Method Tag Values:
converter- Document conversion (Office, images, etc.)pdfa- PDF/A conversion and validationsignature- Digital signaturesbarcode- Barcode generation and recognitionocr- Optical character recognitiontoolbox- PDF manipulation operationsurlconverter- URL to PDF conversion
Thread Pool Layer
Prefix: threadpool
Measures: Thread pool utilization, queue depth, and worker lifecycle metrics (live gauges, no timing)
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
threadpool_active_threads | Gauge | pool | threads | Currently executing worker threads |
threadpool_pool_size_threads | Gauge | pool | threads | Configured maximum thread pool capacity |
threadpool_largest_pool_size_threads | Gauge | pool | threads | Peak number of concurrent threads observed |
threadpool_completed_tasks_total | Counter | pool | tasks | Total number of completed worker tasks (since webPDF 10.0.7; up to 10.0.6 the gauge threadpool_completed_total_tasks) |
threadpool_rejected_tasks_total | Counter | pool | tasks | Tasks rejected due to full queue ⚠️ (since webPDF 10.0.7; up to 10.0.6 the gauge threadpool_rejected_total_tasks) |
threadpool_queue_size_tasks | Gauge | pool | tasks | Current number of tasks waiting in queue |
threadpool_queue_remaining_capacity_tasks | Gauge | pool | tasks | Available queue slots for new tasks |
threadpool_queue_capacity_tasks | Gauge | pool | tasks | Maximum 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
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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
event_consumer_read_batches_total | Counter | - | batches | Total consumer readGroup batches |
event_consumer_read_messages_total | Counter | - | messages | Total messages returned by consumer readGroup |
event_consumer_messages_total | Counter | outcome | messages | Event consumer outcomes by result class |
event_consumer_file_storage_delete_total | Counter | result | operations | File storage deletion results in event consumer |
event_consumer_errors_total | Counter | type | errors | Consumer loop errors by type |
Outcome Tag Values:
processed- Successfully processedretried- Temporary failure, retry scheduledacked_invalid- Invalid message acknowledgeddlq- Moved to dead letter queuemax_deliveries- Maximum delivery attempts reached
File Storage Result Tag Values:
success- File deleted successfullyretryable_failure- Temporary failure, will retrypermanent_failure- Permanent failure, cannot deleteskipped_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 errorredis_timeout- Redis operation timeoutredis_exception- Other Redis exceptionunexpected- Unexpected error
Event Writer Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
event_writer_queue_size | Gauge | - | events | Deletion 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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
dlq_published_total | Counter | origin | entries | DLQ publications by origin |
dlq_reprocess_claimed_total | Counter | - | entries | Total claimed replay entries |
dlq_reprocess_result_total | Counter | result | operations | DLQ replay outcomes |
dlq_lineage_blocked_on_publish_total | Counter | - | operations | DLQ publish operations blocked by lineage protection |
dlq_archive_failures_total | Counter | sink | operations | DLQ archive failures by sink type |
dlq_reprocess_cleanup_removed_total | Counter | - | entries | Removed DLQ entries during retention cleanup |
dlq_store_entries | Gauge | status | entries | Current replay store entries by status |
dlq_store_blocked_lineages | Gauge | - | lineages | Current number of permanently blocked replay lineages |
dlq_store_oldest_pending_age_seconds | Gauge | - | seconds | Age of oldest pending DLQ entry |
Origin Tag Values:
event_writer- Published by event writerevent_consumer- Published by event consumer
Reprocess Result Tag Values:
succeeded- Reprocessing succeededretry- Temporary failure, retry scheduledpermanent_failed- Permanent failureskipped_blocked_lineage- Reprocessing skipped because the entry belongs to a blocked lineage
Archive Sink Tag Values:
best_effort- Best-effort archive sinklocal_mandatory- Local mandatory archive sink
Store Status Tag Values:
pending- Waiting for reprocessingprocessing- Currently being reprocessedsucceeded- Reprocessing succeededfailed_permanent- Permanent failure
Session Metrics
Prefix: webpdf
Measures: Sessions that the session storage of webPDF Server holds
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
webpdf_sessions | Gauge | - | sessions | Number 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
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.
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
webpdf_documents | Gauge | - | documents | Number of documents of the installation at the last successful count |
webpdf_documents_sample_age_seconds | Gauge | - | seconds | Age of the last successful count; NaN before the first one |
webpdf_documents_sample_duration_seconds | Gauge | - | seconds | Duration 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 variable | System property | Default | Description |
|---|---|---|---|
WEBPDF_METRICS_DOCUMENTS_ENABLED | webpdf.metrics.documents.enabled | false | Switches the document count on. Return to the default by setting it to false or removing it. |
WEBPDF_METRICS_DOCUMENTS_INTERVAL | webpdf.metrics.documents.interval | 60000 | Interval between two counts in milliseconds. The minimum is 1000; a smaller value is raised with a warning. |
WEBPDF_METRICS_DOCUMENTS_TIME_LIMIT | webpdf.metrics.documents.time.limit | 10000 | Time 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
/metricsendpoint only returns the cached value and never queries the storage itself. - The value is
NaN(unknown), never0, 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_secondskeeps 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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
cache_server_evicted_keys_total | Counter | - | keys | Keys that the masters of the cache server evicted since webPDF Server observes them, summed over all masters |
cache_server_used_memory_bytes | Gauge | - | bytes | Memory that the masters of the cache server use (used_memory), summed over all masters. Since webPDF 10.0.7 |
cache_server_max_memory_bytes | Gauge | - | bytes | Memory 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.
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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
jvm_memory_used_bytes | Gauge | area, id | bytes | Used memory by memory pool |
jvm_memory_committed_bytes | Gauge | area, id | bytes | Committed memory by memory pool |
jvm_memory_max_bytes | Gauge | area, id | bytes | Maximum 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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
jvm_gc_pause_seconds | Timer | action, cause | seconds | Garbage collection pause duration |
jvm_gc_memory_allocated_bytes_total | Counter | - | bytes | Total memory allocated |
jvm_gc_memory_promoted_bytes_total | Counter | - | bytes | Memory promoted to old generation |
Thread Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
jvm_threads_live_threads | Gauge | - | threads | Current live thread count |
jvm_threads_daemon_threads | Gauge | - | threads | Current daemon thread count |
jvm_threads_peak_threads | Gauge | - | threads | Peak live thread count |
jvm_threads_states_threads | Gauge | state | threads | Current thread count by state |
State Tag Values: runnable, blocked, waiting, timed-waiting, new, terminated
Class Loader Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
jvm_classes_loaded_classes | Gauge | - | classes | Currently loaded class count |
jvm_classes_unloaded_classes_total | Counter | - | classes | Total unloaded class count |
JVM Info Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
jvm_info | Gauge | runtime, vendor, version | - | Constant info metric with JVM runtime metadata |
System Metrics
Prefix: system, process
Measures: Operating system and process metrics
CPU Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
system_cpu_usage | Gauge | - | ratio (0-1) | System-wide CPU usage |
system_cpu_count | Gauge | - | cores | Number of available processors |
process_cpu_usage | Gauge | - | ratio (0-1) | Process CPU usage |
Uptime Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
process_uptime_seconds | Gauge | - | seconds | Process uptime since start |
process_start_time_seconds | Gauge | - | seconds | Process start time (Unix epoch) |
Disk Space Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
disk_free_bytes | Gauge | path | bytes | Free disk space on filesystem |
disk_total_bytes | Gauge | path | bytes | Total disk space on filesystem |
File Descriptor Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
process_files_open_files | Gauge | - | files | Currently open file descriptors |
process_files_max_files | Gauge | - | files | Maximum file descriptors |
Log4j2 Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
log4j2_events_total | Counter | level | events | Log 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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
tomcat_threads_current_threads | Gauge | name | threads | Threads in the thread pool of the connector |
tomcat_threads_busy_threads | Gauge | name | threads | Threads of the connector that are processing a request |
tomcat_threads_config_max_threads | Gauge | name | threads | Configured maximum number of threads of the connector |
Connection Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
tomcat_connections_current_connections | Gauge | name | connections | Open connections of the connector |
tomcat_connections_keepalive_current_connections | Gauge | name | connections | Open connections of the connector in keep-alive state |
tomcat_connections_config_max_connections | Gauge | name | connections | Configured maximum number of connections of the connector |
Request Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
tomcat_global_request_seconds | Timer | name | seconds | Requests processed by the connector (_count) and their total processing time (_sum) |
tomcat_global_request_max_seconds | Gauge | name | seconds | Longest processing time of a single request |
tomcat_global_error_total | Counter | name | requests | Requests answered with a status of 400 or higher |
tomcat_global_received_bytes_total | Counter | name | bytes | Bytes received by the connector |
tomcat_global_sent_bytes_total | Counter | name | bytes | Bytes sent by the connector |
Name Tag: the connector, for example http-nio-8080 (depends on the connector configuration)
Servlet Metrics
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
tomcat_servlet_request_seconds | Timer | name | seconds | Requests of the servlet (_count) and their total processing time (_sum) |
tomcat_servlet_request_max_seconds | Gauge | name | seconds | Longest processing time of a single request of the servlet |
tomcat_servlet_error_total | Counter | name | requests | Requests 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
| Metric | Type | Tags | Unit | Description |
|---|---|---|---|---|
tomcat_cache_access_total | Counter | - | accesses | Lookups in the resource cache of the web application |
tomcat_cache_hit_total | Counter | - | hits | Lookups 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_secondsincreases 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
- Metrics Overview - Configuration and setup
- Authentication - Secure metrics endpoint
- Integration - Prometheus and Grafana setup
- Troubleshooting - Common issues and solutions