[dry-logger] OpenTelemetry logging?

I have been given a Rails application that uses dry-logger and I am tasked with sending its logs to an OpenTelemetry collector.

Has anyone already done this? I’m not familiar with dry-logger but it looks like I can add another ‘backend’ to it.

Is that what you would recommend?

(I have other Rails apps using opentelemetry-ruby and sending logs to the collector, that part is fine. I need to decide whether it makes sense to just do that, or put it behind dry-logger, if there are benefits to keeping it.)

… if anyone wanders by later and needs this, here’s an article with an example backend that sends to OTel: Sending Structured Logs to OpenTelemetry with dry-logger

2 Likes