Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opentelemetry logging Js #404

Closed
scumpah opened this issue Apr 1, 2021 · 4 comments
Closed

Opentelemetry logging Js #404

scumpah opened this issue Apr 1, 2021 · 4 comments

Comments

@scumpah
Copy link

scumpah commented Apr 1, 2021

Very simple use case. I wanna send logs from node-app to collector and export those logs to loki. I managed to integrate collector with loki exporter using this -> https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/lokiexporter/example

So now I am trying to read logs from oltp as receiver through http endpoint instead of fluent forward/fluentd and export them to loki. After going through docs I found out that otel format is required, couldn't find any references on how to send logs from node-app so thought I might ask here.

There are npm packages for tracing and metrics, can the same be used for sending logs to otlp and will they work the same to export logs to loki?

I checked https://opentelemetry.io/docs/js/ and there's no mention/references on sending logs. Thoughts on what to do here?

image

@scumpah scumpah changed the title Opentelemetry logging Opentelemetry logging Js Apr 1, 2021
@scumpah scumpah closed this as completed Apr 1, 2021
@davispuh
Copy link

I'm also looking for JavaScript logging implementation for OpenTelemetry. Has there been any work done, any PRs, repository? I'm willing to contribute with implementation.

@dyladan
Copy link
Member

dyladan commented Jun 23, 2022

There are a couple log appenders in the contrib repo. At least pino, bunyan, and winston.

opentelemetry-instrumentation-bunyan
opentelemetry-instrumentation-pino
opentelemetry-instrumentation-winston

There has not yet been any work started on a log exporter but the latest protos in the otlp-transformation package contains the stable log protocol

@davispuh
Copy link

All of those look like for tracing not logging. I'm talking about logger with .info(), .warn() which would send to OpenTelemetry Collector /v1/logs

@vmarchaud
Copy link
Member

I'm talking about logger with .info(), .warn() which would send to OpenTelemetry Collector /v1/logs

As daniel said, no work was started for logs in JS. If you want to move forwad this, you'll need to create an issue to state what need to be done in order to have an logs api package and sdk package (like what have been done with open-telemetry/opentelemetry-js#2574) and start implementing them in the core repo (https://github.com/open-telemetry/opentelemetry-js)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants