Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JStickler committed Jun 17, 2024
1 parent 97086ea commit b289dbc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/sources/reference/loki-http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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`](#ingest-logs-using-otlp)
- [`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 @@ -264,16 +264,18 @@ curl -H "Content-Type: application/json" \
## Ingest logs using OTLP

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

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

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

<!-- vale Google.Will = NO -->
{{< admonition type="note" >}}
When using cURL, you should format the endpoint as `http://<loki-addr>:3100/otlp/v1/logs`. When configuring Loki or the OpenTelemetry Collector, you must use `endpoint: http://<loki-addr>:3100/otlp`.
When configuring the OpenTelemetry Collector, you must use `endpoint: http://<loki-addr>:3100/otlp`, as the collector automatically completes the endpoint. Entering the full endpoint will generate an error.
{{< /admonition >}}
<!-- vale Google.Will = YES -->

## Query logs at a single point in time

Expand Down

0 comments on commit b289dbc

Please sign in to comment.