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

Winston OpenTel logs collection

Open naorpeled opened this issue 1 year ago • 1 comments
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!

naorpeled avatar Feb 06 '24 13:02 naorpeled

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

pichlermarc avatar Feb 06 '24 15:02 pichlermarc

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.

github-actions[bot] avatar Apr 08 '24 06:04 github-actions[bot]