Skip to content

Commit

Permalink
chore: [release-3.0.x] docs: update otlp ingestion with correct endpo…
Browse files Browse the repository at this point in the history
…int and add endpoint to reference api docs (#13007)

Co-authored-by: Vitor Gomes <41302394+vitoorgomes@users.noreply.github.com>
  • Loading branch information
grafanabot and vitoorgomes committed May 21, 2024
1 parent f265cdf commit 658dbbc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions docs/sources/reference/loki-http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Authorization needs to be done separately, for example, using an open-source loa
These endpoints are exposed by the `distributor`, `write`, and `all` components:

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

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

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

## Ingest logs using OTLP

```bash
POST /otlp/v1/logs
```

`/otlp/v1/logs` lets the OpenTelemetry Collector send logs to Loki using `otlphttp` procotol.

For information on how to configure Loki, refer to the [OTel Collector topic](https://grafana.com/docs/loki/<LOKI_VERSION>/send-data/otel/).

## Query logs at a single point in time

```bash
Expand Down
4 changes: 2 additions & 2 deletions docs/sources/send-data/otel/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You need to make the following changes to the [OpenTelemetry Collector config](h
```yaml
exporters:
otlphttp:
endpoint: http://<loki-addr>:3100/otlp
endpoint: http://<loki-addr>:3100/otlp/v1/logs
```

And enable it in `service.pipelines`:
Expand All @@ -57,7 +57,7 @@ exporters:
otlphttp:
auth:
authenticator: basicauth/otlp
endpoint: http://<loki-addr>:3100/otlp
endpoint: http://<loki-addr>:3100/otlp/v1/logs

service:
extensions: [basicauth/otlp]
Expand Down

0 comments on commit 658dbbc

Please sign in to comment.