GoogleCloudPlatform / opentelemetry-operations-js

This repository is home to Google Cloud Exporters (Trace and Monitoring) for OpenTelemetry Node.js Project (https://github.com/open-telemetry/opentelemetry-js)
Apache License 2.0
68 stars 63 forks source link

Add log record exporter #589

Open pksunkara opened 1 year ago

pksunkara commented 1 year ago

Is your feature request related to a problem? Please describe. There is currently no way to export log records produced by OpenTelemetry to GCP Cloud Logging in pure JS land.

Describe the solution you'd like Add a LogRecordExporter that extends OpenTelemetry's JS LogRecordExporter that exports the logs to GCP Cloud Logging

pksunkara commented 1 year ago

@aabmass I couldn't find anything else that does this and therefore created this feature request. Please let me know if I am missing something.

aabmass commented 1 year ago

@pksunkara thanks for the request. Hoping you can provide some more context, is there a reason that sending OTLP logs to the Collector, Logging to stdout/stderr or a file wouldn't work for you?

pksunkara commented 1 year ago

Sending OTLP logs to the:

We have some small services that are hosted on PaaS apps outside GCP, that we want to send the logs to our central monitoring solution in GCP.

pksunkara commented 1 year ago

@aabmass Any update on this? GCP wouldn't work with opentelemetry without this.

aabmass commented 1 year ago

Hey apologies I missed your last message. I'll talk it over with the team and get back to you. It's definitely low priority on our side since there are existing workarounds.

pksunkara commented 10 months ago

@aabmass I would be willing to contribute this if you can point me on how to get started and tell me a bit on how some internals work.

aabmass commented 7 months ago

@pksunkara unfortunately we can't accept a PR for this to this repo as it's not something we want to maintain. Of course you are welcome to implement it on your own and handle maintenance.

Here is the code for our collector Logs exporter https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/main/exporter/collector/logs.go