opentelemetry-go icon indicating copy to clipboard operation
opentelemetry-go copied to clipboard

Add otlplogfile exporter

Open pellared opened this issue 1 year ago • 2 comments

Implement an experimental OTLP Log File exporter based on https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/file-exporter.md

pellared avatar May 23 '24 13:05 pellared

Hi @pellared!

Before doing this one, as stated in #5500, maybe it will be necessary to introduce something that can serialize the data into the OpenTelemetry JSON format.

Because as you mentioned here, we can add a public function into a otlplogfile package, but is it coherent with what the package is responsible for? I mean that IMHO, the otlplogfile package should be responsible for appending log records to a JSON file.

If we extract the serialization part into another internal (or public, if it makes sense) package such as otlpserde (naming is just an example), we can use a dependency into otlplogfile and stdoutlog, so the format will be consistent across the different implementations.

What do you think about it?

thomasgouveia avatar Aug 08 '24 13:08 thomasgouveia

stdoutlog is intended to be used mainly for debugging therefore it aims for human-readability.

otlplogfile is on the other hand MUST serialize telemetry in computer-readable format as defined in the specification.

I suggest not extracting any separate package until necessary.

pellared avatar Aug 08 '24 15:08 pellared

During last SIG meeting (https://github.com/open-telemetry/opentelemetry-go/pull/5743#issuecomment-2346847692) we decided that we do not want to maintain such exporter until it is stable.

@thomasgouveia, it may be worth to move the exporter you have created in https://github.com/open-telemetry/opentelemetry-go/pull/5743 to a separate repository and maintain it there. I can help you in maintaining it.

pellared avatar Sep 12 '24 18:09 pellared

@pellared may it be located in the contrib repository? Or the contrib focuses only on stable implementation?

If we can't put it in the contrib repository, I can transfer it to a repository on my account, until the specification is stable.

thomasgouveia avatar Sep 13 '24 09:09 thomasgouveia

During SIG it was recommended to not put it to contrib as well yet.

I can transfer it to a repository on my account, until the specification is stable.

Let's do this.

pellared avatar Sep 13 '24 10:09 pellared

A shout-out to work related to OTLP File exporter:

  • https://github.com/open-telemetry/opentelemetry-specification/pull/4183
  • https://github.com/open-telemetry/opentelemetry.io/pull/5600
  • https://github.com/open-telemetry/opentelemetry-java/pull/6675

However, let's wait until it is stable in the specification as we miss velocity to maintain an new experimental module at this point of time.

pellared avatar Nov 26 '24 20:11 pellared