Skip to content

Commit d6f29fc

Browse files
authored
docs: update otlp ingestion with correct endpoint and add endpoint to reference api docs (#12996)
1 parent 3195036 commit d6f29fc

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

‎docs/sources/reference/loki-http-api.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Authorization needs to be done separately, for example, using an open-source loa
2424
These endpoints are exposed by the `distributor`, `write`, and `all` components:
2525

2626
- [`POST /loki/api/v1/push`](#ingest-logs)
27+
- [`POST /otlp/v1/logs`](#ingest-logs-using-otlp)
2728

2829
A [list of clients]({{< relref "../send-data" >}}) can be found in the clients documentation.
2930

@@ -260,6 +261,16 @@ curl -H "Content-Type: application/json" \
260261
--data-raw '{"streams": [{ "stream": { "foo": "bar2" }, "values": [ [ "1570818238000000000", "fizzbuzz" ] ] }]}'
261262
```
262263

264+
## Ingest logs using OTLP
265+
266+
```bash
267+
POST /otlp/v1/logs
268+
```
269+
270+
`/otlp/v1/logs` lets the OpenTelemetry Collector send logs to Loki using `otlphttp` procotol.
271+
272+
For information on how to configure Loki, refer to the [OTel Collector topic](https://grafana.com/docs/loki/<LOKI_VERSION>/send-data/otel/).
273+
263274
## Query logs at a single point in time
264275

265276
```bash

‎docs/sources/send-data/otel/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You need to make the following changes to the [OpenTelemetry Collector config](h
3030
```yaml
3131
exporters:
3232
otlphttp:
33-
endpoint: http://<loki-addr>:3100/otlp
33+
endpoint: http://<loki-addr>:3100/otlp/v1/logs
3434
```
3535
3636
And enable it in `service.pipelines`:
@@ -57,7 +57,7 @@ exporters:
5757
otlphttp:
5858
auth:
5959
authenticator: basicauth/otlp
60-
endpoint: http://<loki-addr>:3100/otlp
60+
endpoint: http://<loki-addr>:3100/otlp/v1/logs
6161
6262
service:
6363
extensions: [basicauth/otlp]

0 commit comments

Comments
 (0)