Slide 3 of 10

Logs collection methods

Collection methods by cloud provider

CloudMethodBest for
AWSFirehoseHigh-volume CloudWatch logs (most use cases)
AWSLambda agentSpecific log types (ALB, CloudFront, CloudTrail)
AzureFunctionsEvent-driven from Event Hub
AzureAlloyEvent Hub with flexible processing
GCPAlloy + Pub/SubAll GCP logs

Quick decision for AWS

ScenarioRecommended method
High log volumes, cost-sensitiveFirehose
CloudWatch logs from apps, RDS, VPC FlowFirehose
ALB access logs, CloudFront, CloudTrailLambda agent

Script

For logs, your collection options look a bit different than metrics.

In AWS, you have two main methods. Amazon Data Firehose is the recommended approach for most CloudWatch logs. It’s a managed streaming service that’s more scalable, about three times cheaper than Lambda, and handles high log volumes seamlessly with built-in retry handling.

Lambda, also called lambda-promtail, is for specific log types that Firehose doesn’t support yet, like ALB access logs, CloudFront logs, and CloudTrail audit logs. Lambda triggers on events to process and forward these logs to Loki.

For Azure, you have similar options: Azure Functions for event-driven collection from Event Hub, or Grafana Alloy for more flexibility.

For GCP, there’s no serverless option. The standard approach is to route logs through Pub/Sub and have Alloy subscribe to that topic.

So your choice depends on your log volumes, cost considerations, and which specific log types you need. Let’s go through each approach.