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

internal: stacktrace: skip internal packages #2697

Merged
merged 4 commits into from
May 21, 2024

Conversation

eliottness
Copy link
Contributor

@eliottness eliottness commented May 17, 2024

What does this PR do?

This PR refactors the internal/stacktrace package to skip modules managed by the tracer to provide a cleaner stacktrace to users.

Motivation

The default stack size is 32 and is bloated with internal code that the user does not care about

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
@eliottness eliottness requested a review from a team as a code owner May 17, 2024 10:50
@pr-commenter
Copy link

pr-commenter bot commented May 17, 2024

Benchmarks

Benchmark execution time: 2024-05-21 09:19:03

Comparing candidate commit cd6ecbc in PR branch eliott.bouhana/APPSEC-53211 with baseline commit 72faee8 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 44 metrics, 0 unstable metrics.

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
Copy link
Contributor

@Hellzy Hellzy left a comment

Choose a reason for hiding this comment

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

LGTM overall.

Like we discussed I think a ring buffer could be a nice addition to the frame traversal to avoid those queue/dequeue operations on large stacktraces

go.sum Show resolved Hide resolved
@eliottness eliottness enabled auto-merge (squash) May 21, 2024 08:37
auto-merge was automatically disabled May 21, 2024 08:41

Pull Request is not mergeable

Signed-off-by: Eliott Bouhana <eliott.bouhana@datadoghq.com>
@eliottness eliottness merged commit 5c8a345 into main May 21, 2024
200 checks passed
@eliottness eliottness deleted the eliott.bouhana/APPSEC-53211 branch May 21, 2024 09:39
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