Skip to content

Commit 658dbbc

Browse files
chore: [release-3.0.x] docs: update otlp ingestion with correct endpoint and add endpoint to reference api docs (#13007)
Co-authored-by: Vitor Gomes <[email protected]>
1 parent f265cdf commit 658dbbc

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

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

+11
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Authorization needs to be done separately, for example, using an open-source loa
2525
These endpoints are exposed by the `distributor`, `write`, and `all` components:
2626

2727
- [`POST /loki/api/v1/push`](#ingest-logs)
28+
- [`POST /otlp/v1/logs`](#ingest-logs-using-otlp)
2829

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

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

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

266277
```bash

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

+2-2
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)