Closed arukiidou closed 6 months ago
curl -H 'Content-Type: application/json' -X POST -v -s 'http://localhost:4318/v1/logs' --data-raw '{
...
}'
# * Trying ::1...
# * TCP_NODELAY set
# * Connected to localhost (::1) port 4318 (#0)
# > POST /v1/logs HTTP/1.1
# > Host: localhost:4318
# > User-Agent: curl/7.61.1
# > Accept: */*
# > Content-Type: application/json
# > Content-Length: 2843
# > Expect: 100-continue
# >
# < HTTP/1.1 100 Continue
# * We are completely uploaded and fine
# < HTTP/1.1 200 OK
# < Content-Type: application/json
# < Date: Wed, 15 May 2024 14:25:56 GMT
# < Content-Length: 21
# <
# * Connection #0 to host localhost left intact
# {"partialSuccess":{}}
ingest endpoint
http://localhost:4318/v1/logs
ORhttp://localhost:3100/otlp/v1/logs
(exporter:http://localhost:3100/otlp
)guide
https://grafana.com/docs/loki/latest/send-data/otel/#configure-the-opentelemetry-collector-to-write-logs-into-loki
source
https://github.com/grafana/loki/blob/19fef9355fdd46911611dbec25df0f5a4e397d31/pkg/loki/modules.go#L370
TESTS
✅OK
see: https://github.com/open-telemetry/opentelemetry-proto/blob/main/examples/logs.json