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

# 获取 Prometheus 指标文本



## OpenAPI

````yaml openapi/arc-observability.zh.openapi.yaml get /metrics
openapi: 3.1.0
info:
  title: Arc 可观测性管理 API
  version: 1.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  description: |
    管理面可观测性端点的 OpenAPI 定义，接口实现位于 `crates/arc-observability/src/lib.rs`。

    鉴权行为：
    - 如果配置了管理鉴权令牌，请携带 `Authorization: Bearer <token>`。
    - 如果未配置令牌，仅允许本机回环地址访问。
servers:
  - url: http://127.0.0.1:9090
security:
  - bearerAuth: []
  - {}
paths:
  /metrics:
    get:
      summary: 获取 Prometheus 指标文本
      operationId: getPrometheusMetrics
      responses:
        '200':
          description: Prometheus 暴露格式
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: 未授权
          content:
            text/plain:
              schema:
                type: string
              example: |
                unauthorized
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque

````