Skip to content

dev/sg: spin up local Loki instance and ingest log archive

Created by: bobheadxi

We often get log dumps from customers in the form of something like this: https://github.com/sourcegraph/customer/issues/963#issuecomment-1130816109

We already have a local setup for Loki, a log backend from Grafana - this was previously used to test CI logs export (https://github.com/sourcegraph/sourcegraph/pull/25835):

https://github.com/sourcegraph/sourcegraph/blob/7533ada4fd47e82d95f7258cbb88ca76f414e53d/sg.config.yaml#L672-L686

We already have some code for pushing logs to a Loki instance, it would be pretty straight-forward to adapt that to handle log archives from customers like the example above. This would work similarly to https://sourcegraph.grafana.net/goto/aK_pYBX7k?orgId=1, except locally.