You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding an option to the BunyanInstrumentation constructor to set a custom log level for which log records are sent to the Logs SDK for the "log sending" feature. Something like this:
newBunyanInstrumentation({logLevel: "trace"})
If that instrumentation was made active for this application:
constlogger=bunyan.createLogger({name: 'myapp',level: 'debug'})logger.debug('hi at debug level')logger.trace('hi at trace level')
then it would result in both log messages being sent to the Logs SDK, where as the Bunyan output to stdout would only emit the "hi at debug level" record.
Adding a generic environment variable that could be used to configure this log level on any instrumentations of logging frameworks (Bunyan, Winston, Pino, perhaps one instrumenting console.* logging). Something like OTEL_NODE_LOG_LEVEL.
These could be implemented separately. For each of these, there is the question of what level names should be used: (a) the level names defined by the logging framework, or (b) the severity names sort of defined by the OTel Logs data model.
These were discussed during the 2023-11-22 OTel JS SIG meeting (recording). Some notes/opinions from that call:
Spin this off to a separate issue (that's this issue).
The logLevel argument to the [Framework]Instrumentation() constructor might best be in terms of the logging framework's log levels. I.e. new BunyanInstrumentation({ logLevel }) would use Bunyan log levels.
This is a spin-off from discussion on #1713
starting at #1713 (comment)
There are a couple separate things here:
Adding an option to the BunyanInstrumentation constructor to set a custom log level for which log records are sent to the Logs SDK for the "log sending" feature. Something like this:
If that instrumentation was made active for this application:
then it would result in both log messages being sent to the Logs SDK, where as the Bunyan output to stdout would only emit the "hi at debug level" record.
Adding a generic environment variable that could be used to configure this log level on any instrumentations of logging frameworks (Bunyan, Winston, Pino, perhaps one instrumenting
console.*
logging). Something likeOTEL_NODE_LOG_LEVEL
.These could be implemented separately. For each of these, there is the question of what level names should be used: (a) the level names defined by the logging framework, or (b) the severity names sort of defined by the OTel Logs data model.
These were discussed during the 2023-11-22 OTel JS SIG meeting (recording). Some notes/opinions from that call:
logLevel
argument to the[Framework]Instrumentation()
constructor might best be in terms of the logging framework's log levels. I.e.new BunyanInstrumentation({ logLevel })
would use Bunyan log levels.The text was updated successfully, but these errors were encountered: