Skip to content
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

feat(callhome): change the events tracing target from 'mbus-target' to 'mbus-events-target' #35

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion events-api/src/event_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl EventMessage {
/// Generate the event trace with event message.
pub fn generate(&self) {
let event_data = serde_json::to_string(&self).unwrap_or_default();
tracing::event!(target: "target-mbus", tracing::Level::INFO, event_data);
tracing::event!(target: "mbus-events-target", tracing::Level::INFO, event_data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, should we only add event in case serde_json above is ok? Atm we're doing it for default which will be bogus if json to string fails..

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should be done if there is an error? Should I print the error message to debug?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah perhaps? Though might be better to leave as is, and let event subscribers pick up, presumably they'd flag receiving empty String when they expect an event type?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Stats module will probably trace the unknown events. Will have to check.

Copy link
Contributor Author

@datacore-vvarakantham datacore-vvarakantham Jul 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message will not be published to the mbus, as the message id is empty. The events-api lib gives the InvalidMessageId error.

}
}

Expand Down
Loading