-
Notifications
You must be signed in to change notification settings - Fork 84
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
assert: emit events for assertions #1703
assert: emit events for assertions #1703
Conversation
d7c4cfa
to
131b3ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, mostly this looks good
test/common/main_interface_test.cc
Outdated
// Verify that no crash if the assertion fails when no real event | ||
// tracker is passed at engine's initialization time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verify that we don't crash
What assertion is failing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to change the order of sentences in this comment but basically we are simulating a failed assertion by calling Assert::invokeDebugAssertionFailureRecordActionForAssertMacroUseOnly
:
// Simulate a failed assertion by invoking a debug assertion failure
// record action.
library/common/main_interface.h
Outdated
@@ -163,9 +163,11 @@ envoy_status_t register_platform_api(const char* name, void* api); | |||
* Initialize an engine for handling network streams. | |||
* @param callbacks, the callbacks that will run the engine callbacks. | |||
* @param logger, optional callbacks to handle logging. | |||
* @param event_tracker, optional event tracker for the emission of events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Asking because you're explicitly registering a null tracker in the cc path.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah, it's not - used to be initially since it was a pointer but I changed it to be a struct so this no longer holds. Updating.
In principal I'm good with this. I have some nits that I've refrained from posting here - I'd be fine with merging and iterating. Depending on what you'd like to do though, I can post them and we could iterate here as well. |
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
32e4d0f
to
c2ab3dc
Compare
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
Signed-off-by: Rafal Augustyniak <raugustyniak@lyft.com>
c2ab3dc
to
9ab360d
Compare
Description: Send an envoy event with the use of envoy event tracker every time an assertion is hit. The event contains two fields:
name
equal toassertion
and location which contains the information about the name of the file and line number for where the assertion was hit.Risk Level: Low. Optional feature that's active only when
DENVOY_LOG_DEBUG_ASSERT_IN_RELEASE
compilation flag is specified.Testing: Unit/Integration
Docs Changes: N/A
Release Notes: N/A