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

# OpenTelemetry（OTLP）

> 通过 OTLP HTTP 或 gRPC exporter 接入。

把任意 OpenTelemetry SDK 或 Collector 指向 MoleSignal。

| 传输        | 端点                                                     |
| --------- | ------------------------------------------------------ |
| OTLP HTTP | `POST /api/v1/logs`、`/api/v1/metrics`、`/api/v1/traces` |
| OTLP gRPC | `:4317`                                                |

<RequestExample>
  ```yaml OTel Collector theme={null}
  exporters:
    otlphttp:
      endpoint: http://localhost:5080/api/v1
      headers:
        authorization: "Bearer ${MS_JWT}"
    otlp:
      endpoint: localhost:4317
      headers:
        authorization: "Bearer ${MS_JWT}"
  ```
</RequestExample>

端口 `5082` 保留给可信内部集群 gRPC，不是 OTLP receiver。两种传输都需要具备 `streams.write` 的
Bearer 凭据。可通过可选的 `stream-name` header 覆盖默认数据流。
