wit-bindgen: Don't trace values containing lists by default.#9262
Merged
alexcrichton merged 4 commits intobytecodealliance:mainfrom Sep 17, 2024
Merged
Conversation
alexcrichton
approved these changes
Sep 17, 2024
alexcrichton
approved these changes
Sep 17, 2024
`list` values in Wit interfaces can represent things like HTTP bodies which can be very large. To enable tracing without spamming logfiles with all this data, put printing of values containing `list`s behind a separate `verbose_tracing` option. This is a coarse-grained approach; but it seems like a pretty good default for tracing, and enabling full tracing when one needs it is straightforward. In the future, we may want to refine the option by implementing the `Valuable` trait and using `tracing::field::valuable`, which could allow us to do things like print non-`list` fields of records that otherwise contain `list`s.
c35dcd5 to
27986c3
Compare
elliottt
pushed a commit
to elliottt/wasmtime
that referenced
this pull request
Sep 17, 2024
…ealliance#9262) * wit-bindgen: Don't trace values containing lists by default. `list` values in Wit interfaces can represent things like HTTP bodies which can be very large. To enable tracing without spamming logfiles with all this data, put printing of values containing `list`s behind a separate `verbose_tracing` option. This is a coarse-grained approach; but it seems like a pretty good default for tracing, and enabling full tracing when one needs it is straightforward. In the future, we may want to refine the option by implementing the `Valuable` trait and using `tracing::field::valuable`, which could allow us to do things like print non-`list` fields of records that otherwise contain `list`s. * Use `option_type_contains_lists` more. * Hook up `verbose_tracing` to the macro. * Update expected outputs for tests.
alexcrichton
pushed a commit
that referenced
this pull request
Sep 17, 2024
* wit-bindgen: Don't trace values containing lists by default. (#9262) * wit-bindgen: Don't trace values containing lists by default. `list` values in Wit interfaces can represent things like HTTP bodies which can be very large. To enable tracing without spamming logfiles with all this data, put printing of values containing `list`s behind a separate `verbose_tracing` option. This is a coarse-grained approach; but it seems like a pretty good default for tracing, and enabling full tracing when one needs it is straightforward. In the future, we may want to refine the option by implementing the `Valuable` trait and using `tracing::field::valuable`, which could allow us to do things like print non-`list` fields of records that otherwise contain `list`s. * Use `option_type_contains_lists` more. * Hook up `verbose_tracing` to the macro. * Update expected outputs for tests. * Add release notes --------- Co-authored-by: Dan Gohman <dev@sunfishcode.online>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
listvalues in Wit interfaces can represent things like HTTP bodies which can be very large. To enable tracing without spamming logfiles with all this data, put printing of values containinglists behind a separateverbose_tracingoption.This is a coarse-grained approach; but it seems like a pretty good default for tracing, and enabling full tracing when one needs it is straightforward.
In the future, we may want to refine the option by implementing the
Valuabletrait and usingtracing::field::valuable, which could allow us to do things like print non-listfields of records that otherwise containlists.