-
Notifications
You must be signed in to change notification settings - Fork 431
Support emitting traces behind feature flag #2576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Package Changes Through 4a434d8There are 12 changes which include autostart with minor, autostart-js with minor, http with patch, http-js with patch, deep-link with patch, deep-link-js with patch, log with minor, log-js with minor, fs with patch, fs-js with patch, updater with minor, updater-js with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
I'm not the most familiar with tracing but it looks good to me in general, and since it doesn't affect existing code anyways, this is a good start, I'll merge it Nice work, thanks! |
* Let logging be skippable so user can handle logger() * Add changes file * changes meta info * Update documentation * Support emitting to tracing behind feature flag * typo * rename key_values => kv * changes file * Remove rebase skip-logger * fix format
Short Description:
This PR adds an optional "tracing" feature that will emit log messages to
tracing
. It does not affect current logging. To keep things simple, by enabling the feature, you're opting into emitting totracing
. This was to avoid adding state to the Tauri app on behalf of the plugin that would hold some sort of "is_using_tracing" value.Problem it's addressing
To currently leverage tracing without this PR, applications must call
skip_logger()
and setup of thetracing-log
logger themselves. This is overall fine. However, I was encountering issues with thetracing-log
crate on iOS so wanted to a way to avoid the bridge. Additionally, since I only use tracing myself within my code, I only had the adapter to support this plugin and therefore this feature removes that requirement.So overall, this PR would support:
skip_logger()
which would nop on the logger invocation and emit the trace.Implementation is fairly basic in order to avoid unnecessary complexity. Please let me know if you have any feedback.