Loki ingestion of Azure PAAS and FAAS logs

I am the new Observability Engineer for a company with Azure hosted SAAS solutions using mostly Azure PAAS and FAAS (App Services, Functions, Cosmo, Redis Cache, Azure SQL API Management, App Gateway, etc.).

I would like to pull all of our PAAS and FAAS logs, along with Application Logs, into Loki but cannot seem to find any references to the best way to do that.

Grafana’s integration with Log Analytics and Application Insights is obvious - but I am not sure if that information is then available to Loki or if we need to setup Ingestion to pull logs from say - Blob Storage.

Where should I look for Azure details for Loki integration?

You may be venturing into uncharted territory here a little, we have a little work on getting amazon cloudwatch logs and are working on GCP logs but I don’t think I’ve seen anyone capturing azure logs yet.

Typically it’s done through a lambda type process (amazon) or a messaging bus type solution (google pub/sub)

The tricky part in most cases is the ordering constraint for Loki requring all logs for a stream to be sent in order, we have been working around this by using a promtail client in the middle which accepts logs from many lambdas but re-stamps the timestamp based on when they are received. This isn’t a great solution however.

We have started work on removing the ordering constraint from Loki, gonna take a little work though to do this.

This blog post talks about the lambda and promtail solution a little more.

This is the lambda code

These may be helpful if you start exploring!