Opentelemetry log example?

Hi,

I’m trying to get my head around the opentelemetry-erlang library.

Are there any good Erlang examples of how to output log messages (or any good Erlang examples really…) ?
Cheers, T

do you want to send events or opentraces?

I started out exploring how to send log output via OpenTelemetry, but later found out that
it apparently isn’t supported (?).

So really, any Erlang examples of how to send anything would be nice :slight_smile:
(preferably from some real application/library code)

Thanks, T

frankly speaking, easiest and most practice standard here is json output to stdout. NDJSON of course.

We have implemented our own opentelemetry tracing collector and our own metrics collector (I have to collect more than 1,5 billions rows per day, so we had to design it properly).

But logging - no, just NDJSON is the best friend.

However, it should be structured. We define structures in openapi schema

Ok thanks, any public code you could point at for reference?

What about sending metrics, etc… ?

Cheers, T

Here is our production ready opentelemetry tracing collector.

It just works, feel free to adapt it to your needs.

Logs are written as:

io:format(“~s\n”,[json:encode(..)])

Metrics collection - this is a state of art. Very long to discuss, maybe I should tell it on some conference.

3 Likes

Great, thanks!