Bug 2013658 - Register for multiple tracing events#7202
Open
bendk wants to merge 1 commit intomozilla:mainfrom
Open
Bug 2013658 - Register for multiple tracing events#7202bendk wants to merge 1 commit intomozilla:mainfrom
bendk wants to merge 1 commit intomozilla:mainfrom
Conversation
Added a new `register_event_sink` method that registers event sinks using the new `EventSinkSpecification` struct. This is general enough that we can use it to implement the older registration methods. This is a breaking change, but Desktop is the only platform that's will be affected. We can resolve the breakage when we do the next vendor.
bendk
commented
Feb 3, 2026
| /// Register an event sink that will receive events based on a target/level pair. | ||
| /// | ||
| /// Returns an [EventSinkId] that can be used to unregister the sink. | ||
| pub fn register_target_event_sink( |
Contributor
Author
There was a problem hiding this comment.
I kept these around since it was simple enough to continue to support them, but maybe we should remove them and encourage everyone to use the new API.
bendk
commented
Feb 3, 2026
| warn!(target: "third_target", extra=-4, "event message3"); | ||
| info!(target: "third_target", extra=-5, "event message (should be filtered)"); | ||
| // Matches both for first_target and for the min-level, it should only be received once by | ||
| // the sink |
Contributor
Author
There was a problem hiding this comment.
This is the main reason for this change. On Desktop, when I went to wire up the error-reporting code, I had issues because both the event's target matched and the min-level matched, so we were getting duplicate events and would be reporting each error twice.
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.
Added a new
register_event_sinkmethod that registers event sinks using the newEventSinkSpecificationstruct. This is general enough that we can use it to implement the older registration methods.This is a breaking change, but Desktop is the only platform that's will be affected. We can resolve the breakage when we do the next vendor.
Pull Request checklist
[ci full]to the PR title.