Skip to content

debug: add envoy version stamp to backtrace#8358

Merged
lizan merged 4 commits intoenvoyproxy:masterfrom
lizan:stack_trace_version
Sep 26, 2019
Merged

debug: add envoy version stamp to backtrace#8358
lizan merged 4 commits intoenvoyproxy:masterfrom
lizan:stack_trace_version

Conversation

@lizan
Copy link
Copy Markdown
Member

@lizan lizan commented Sep 24, 2019

Description:
Add envoy version stamp to backtrace logging so we don't have to ask the exact version of the backtrace.

Risk Level: Low
Testing: CI
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Lizan Zhou lizan@tetrate.io

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
Signed-off-by: Lizan Zhou <lizan@tetrate.io>
alyssawilk
alyssawilk previously approved these changes Sep 25, 2019
RELEASE_ASSERT(sigaltstack(&stack, &previous_altstack_) == 0, "");

// Make sure VersionInfo::version() is initialized so we don't allocate std::string in signal
// handlers.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch :-)

*/
void logTrace() {
ENVOY_LOG(critical, "Backtrace (use tools/stack_decode.py to get line numbers):");
ENVOY_LOG(critical, "Envoy version: {}", VersionInfo::version());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think of adding EXPECT_LOG_CONTAINS for "Envoy version" in backtrace_test just to make sure we don't lose this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done :)

@alyssawilk alyssawilk self-assigned this Sep 25, 2019
@lizan lizan merged commit c0e2c81 into envoyproxy:master Sep 26, 2019
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Oct 4, 2019
Description:
Add envoy version stamp to backtrace logging so we don't have to ask the exact version of the backtrace.

Risk Level: Low
Testing: CI
Docs Changes: N/A
Release Notes: N/A

Signed-off-by: Lizan Zhou <lizan@tetrate.io>
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.

2 participants