Skip to content

Instantly share code, notes, and snippets.

View astrojuanlu's full-sized avatar

Juan Luis Cano Rodríguez astrojuanlu

View GitHub Profile
@austinlparker
austinlparker / README.md
Last active October 31, 2024 06:59
OpenTelemetry Collector Log Parser for ATProto PDS

Parsing PDS Logs With OpenTelemetry

This configuration should parse your ATProto/Bluesky PDS logs into nicely formatted and structured OpenTelemetry Logs.

You'll need to use OpenTelemetry Collector Contrib, and you can either install it on your host or run it as a container (if running as a container, you'll need to map the Docker log path in as a read-only volume).

This also assumes that your Docker daemon.json has "tag": "{{.Name}}|{{.ImageName}}|{{.ID}}" set under log-opts (this is how we parse the container metadata).

As an exercise to the reader, you can use the count connector to parse the log stream into Prometheus or OTLP metrics. You can also add in hostmetrics receiver to get memory, CPU, disk, etc. utilization.