> ## Documentation Index
> Fetch the complete documentation index at: https://goldrush.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get pipeline metrics

> Point-in-time throughput and lag metrics for a pipeline.

<Info>
  Requires a **ServiceKey**. See [Service Keys](/goldrush-pipeline-api/service-keys).
</Info>

Returns a snapshot of throughput and lag indicators at the moment of the request. There are no time-range query parameters - call repeatedly to build a time series client-side.

| Field                  | What it means                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `records_consumed`     | Source records read since the worker started.                                                                                                    |
| `last_offset`          | Last source offset committed by the worker.                                                                                                      |
| `last_block_height`    | Most recent block height processed.                                                                                                              |
| `pending_records`      | Records buffered but not yet written to the destination.                                                                                         |
| `processing_delay_ms`  | End-to-end processing delay, source to destination.                                                                                              |
| `records_per_second`   | Rolling throughput.                                                                                                                              |
| `normalization_errors` | Records dropped due to normalization or decoding errors. Compare against [`logs`](/api-reference/pipeline-api/get-pipeline-logs) to investigate. |


## OpenAPI

````yaml GET /platform/pipeline-api/{pipeline_id}/metrics/
openapi: 3.1.0
info:
  title: GoldRush Pipeline API
  version: 1.0.0
  description: >-
    REST API for programmatic CRUD over GoldRush pipelines. Authentication uses
    a ServiceKey - regular GoldRush API keys are not accepted on these
    endpoints.
servers:
  - url: https://api.covalenthq.com
security:
  - serviceKeyAuth: []
paths:
  /platform/pipeline-api/{pipeline_id}/metrics/:
    parameters:
      - name: pipeline_id
        in: path
        required: true
        description: The pipeline identifier, prefixed with `pipe_`.
        schema:
          type: string
    get:
      tags:
        - pipelines
      summary: Get pipeline metrics
      description: Point-in-time snapshot of pipeline throughput and lag indicators.
      operationId: getPipelineMetrics
      responses:
        '200':
          description: Pipeline metrics snapshot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineMetricsEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    PipelineMetricsEnvelope:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PipelineMetrics'
        error:
          type: boolean
        error_message:
          type: string
          nullable: true
        error_code:
          type: string
          nullable: true
    PipelineMetrics:
      type: object
      description: Point-in-time pipeline metrics.
      properties:
        uid:
          type: string
          description: Internal runtime identifier of the pipeline worker.
          example: covalent-postgres-pipe-3e8678c5fc9e48a7bf9879ca729
        records_consumed:
          type: integer
          description: Records read from the source since worker start.
        last_offset:
          type: integer
          description: Last source offset committed by the worker.
        last_block_height:
          type: integer
          description: Most recent block height processed.
        pending_records:
          type: integer
          description: Records buffered but not yet written to the destination.
        processing_delay_ms:
          type: integer
          description: End-to-end processing delay in milliseconds.
        records_per_second:
          type: number
          description: Throughput in records per second (rolling).
        normalization_errors:
          type: integer
          description: Records dropped due to normalization or decoding errors.
    ErrorEnvelope:
      type: object
      properties:
        data:
          type: object
          nullable: true
        error:
          type: boolean
        error_message:
          type: string
        error_code:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid ServiceKey.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: >-
        The credential supplied is not a ServiceKey, or the ServiceKey does not
        have access to this pipeline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Pipeline does not exist or is not visible to this ServiceKey.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    serviceKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: ServiceKey
      description: >-
        Pipeline REST endpoints require a ServiceKey. Regular GoldRush API keys
        are rejected with 403. See [Service
        Keys](/goldrush-pipeline-api/service-keys).

````