Skip to content

trentm/otellogsplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

/me playing with OTel logging

Currently this is a proof-of-concept for an OTel Logs SDK appender for Bunyan.

Usage

npm install
node bunyan-otel.js

This creates a Bunyan logger with an "OTelBunyanAppender" stream. The OTel Logs SDK is setup to emit records to the console. Any Bunyan logger methods are emitted to the stdout (the default) and through the Logs SDK.

The Bunyan appender is here.

Open Questions and TODOs

TODO later

// TODO: test with *only* the otel appender.
// var log = bunyan.createLogger({
//   name: 'myapp',
//   streams: [
//     {
//       type: 'raw',
//       stream: new OTelBunyanAppender()
//     }
//   ]
// });

// log.info({time: 'foo'}, 'hi');  // Testing edge case with a given 'time' field.

About

/me playing with OTel logging

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published