opentelemetry-js
opentelemetry-js copied to clipboard
Winston OpenTel logs collection
trafficstars
Hey, does anyone have a code example of how to transform a Winston log format into an OpenTel compliant format and then pass the data to the OpenTel collector?
Thanks in advance!
Hi @naorpeled, thanks for reaching out :slightly_smiling_face:
there's currently an open PR that will add that feature to the winston instrumentation:
- https://github.com/open-telemetry/opentelemetry-js-contrib/pull/1837
- it adds a winston transport which transforms winston logs to an OTel format using the Logs API.
So possible answers to this question are:
- waiting for the PR to be merged and then using the winston instrumentation
- implementing a transport that transforms winston to do a similar thing as in the PR
For further tracking of of this feature, please use https://github.com/open-telemetry/opentelemetry-js-contrib/issues/1558
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.