PrizmDoc® Viewer v14.0 Release - Updated
PrizmDoc OCR API / OCR API Reference / OCR Process Manager Metrics API
In This Topic
    OCR Process Manager Metrics API
    In This Topic

    Metrics

    The Process Manager Metrics REST API is used to fetch the Prometheus metrics of the server.

    Available URLs

    URL Description
    GET /metrics A request to get the Prometheus metrics of the server.

    GET /metrics

    This route will return metrics in the normal Prometheus format.

    Success 200

    Field Description
    200 Server is healthy and exposes Prometheus metrics.

    Successful Response

    Response body

    Plain text body in Prometheus format.

    Process Manager Metrics are described in the table below:

    Name Type Description
    info{version} gauge A gauge with the value, 1.0, and a label with the Process Manager's version number.
    database_retries_total counter The number of times that a failed database operation was retried. For example, if three separate operations were retried once each, this counter would increase by 3. If one operation failed and was retried 4 times, this counter would increase by 4.
    licensingStatusGauge gauge The licensing status: 1 if the Process Manager has a valid license and the most recent usage report (if any) was successful and 0 otherwise.
    processes_queued{type,state} gauge The number of processes currently in queue, labeled by type and state. Populating this metric requires a database query.
    processes_errored_total{type} counter The number of processes that fail due to input validation or other unrecoverable errors, labeled by type.
    processes_failed_total{type} counter The number of processes that fail because the process has exceeded the maximum number of processing attempts, labeled by type.
    processes_total{type} counter The number of completed processes (including errored and failed processes), labeled by type.
    process_manager_task_tracking_bugs_detected_total counter The number of bugs detected.
    process_manager_task_tracking_task_duration_seconds{type} gauge The number of active tasks.
    process_manager_task_tracking_tasks_completed_total{type} counter The total number of tasks completed.
    process_manager_task_tracking_task_duration_seconds{le, type} histogram The duration of completed tasks.
    process_pending_duration_seconds{type} histogram The time between when a process is created and when it is first picked up by a worker, labeled by type.
    process_duration_seconds{type} histogram The time between when a process is created and when it either enters a terminal state or expires while still in the processing state, labeled by type.
    reservation_connection_errors_total{type} gauge The number of POST /reservations requests that failed due to some kind of network issue. Generally, this indicates that the worker crashed.
    reservations{type,version} gauge The number of available reservations, labeled by process type and version.
    reservations_abandoned{type} counter The number of reservations that were abandoned without completing or erroring, labeled by process type.
    tenant_privacy_violation_attempts_total{type} counter The number of times a request was made with the wrong tenant ID (or sub-tenant ID).

    NOTE: A reservation is a request from a worker for a process.

    Examples

    Request

    GET /metrics
    
    

    Successful Response

    HTTP 200 OK
    Content-Type: text/plain; version=0.0.4; charset=utf-8
    
    # HELP process_manager_task_tracking_active_tasks Number of active tasks.
    # TYPE process_manager_task_tracking_active_tasks gauge
    process_manager_task_tracking_active_tasks{type="process"} 1
    process_manager_task_tracking_active_tasks{type="initialization"} 0
    process_manager_task_tracking_active_tasks{type="periodicTasks"} 1
    process_manager_task_tracking_active_tasks{type="reserveProcesses"} 0
    process_manager_task_tracking_active_tasks{type="deleteExpiredReservations"} 0
    process_manager_task_tracking_active_tasks{type="collectAdditionalMetrics"} 0
    process_manager_task_tracking_active_tasks{type="internalHttpRequest"} 1
    
    # HELP process_manager_task_tracking_tasks_completed_total Total number of tasks completed.
    # TYPE process_manager_task_tracking_tasks_completed_total counter
    process_manager_task_tracking_tasks_completed_total{type="initialization"} 1
    process_manager_task_tracking_tasks_completed_total{type="reserveProcesses"} 7
    process_manager_task_tracking_tasks_completed_total{type="deleteExpiredReservations"} 3
    process_manager_task_tracking_tasks_completed_total{type="collectAdditionalMetrics"} 3
    
    ...