Skip to content

s2: set up Loki logging that properly ingests OTel logs as structured logs

Created by: bobheadxi

s2 == sourcegraph.sourcegraph.com until we find a better name :)

Right now in Loki the logs are somewhat mangled due to a weird stderr F prefix on all messages: https://sourcegraph.grafana.net/explore?orgId=1&left=%7B%22datasource%22:%22grafanacloud-sourcegraph-logs%22,%22queries%22:%5B%7B%22refId%22:%22A%22,%22expr%22:%22%7Bapp%3D%5C%22sourcegraph-frontend%5C%22%7D%22%7D%5D,%22range%22:%7B%22from%22:%22now-1h%22,%22to%22:%22now%22%7D%7D

We should implement some kind of forwarding that allows Loki to treat these natively as structured logs