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
Is your feature request related to a problem? Please describe.
Hi folks 👋🏼 ,
I am creating a small library wrapping the SDK to standardize its usage within my company. As we use a custom Otel collector, we need to disable the options validation by providing the skipOptionsValidation flag in the sdk instantiation. However, as a result a debug log is printed to the console. In the browser its not such a big deal, as the debug log level is disabled by default, nevertheless when running tests in node, the stdout gets cluttered with those debug messages.
Describe the solution you'd like
I was wondering if you would consider adding a logLevel flag to the sdk so we can set it to info or error when running in test mode. I've checked the source code, identifying the location in which a custom logger could be used. Let me know if you might accept PRs with it or how the contribution process works.
Describe the alternatives
For now I've found a workaround by monkey patching the global console object and disallowing any debug call.
<!--
Thank you for contributing to the project! 💜
Please see our [OSS process
document](https://github.com/honeycombio/home/blob/main/honeycomb-oss-lifecycle-and-practices.md#)
to get an idea of how we operate.
-->
## Which problem is this PR solving?
- Closes#279
## Short description of the changes
Users will now have the option to set a log level when initializing the
SDK. This log level controls the verbosity of logs outputted. The
current log levels includes DEBUG, INFO, WARN, and ERROR.
## How to verify that this has the expected result
- Unit tests have been added
- I tested locally by reproducing the issue and seeing if my changes
fixed the issue
Is your feature request related to a problem? Please describe.
Hi folks 👋🏼 ,
I am creating a small library wrapping the SDK to standardize its usage within my company. As we use a custom Otel collector, we need to disable the options validation by providing the
skipOptionsValidation
flag in the sdk instantiation. However, as a result a debug log is printed to the console. In the browser its not such a big deal, as the debug log level is disabled by default, nevertheless when running tests in node, the stdout gets cluttered with those debug messages.Describe the solution you'd like
I was wondering if you would consider adding a
logLevel
flag to the sdk so we can set it to info or error when running in test mode. I've checked the source code, identifying the location in which a custom logger could be used. Let me know if you might accept PRs with it or how the contribution process works.Describe the alternatives
For now I've found a workaround by monkey patching the global console object and disallowing any debug call.
Note: We use the latest version of Node, that's why we use the globalThis object.
The text was updated successfully, but these errors were encountered: