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

Conversation

datacore-vvarakantham
Copy link
Contributor

No description provided.

@@ -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.

@tiagolobocastro tiagolobocastro merged commit 2eb12fa into openebs:develop Jul 25, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants