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

profiler: add go_num_goroutine metric #2217

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

felixge
Copy link
Member

@felixge felixge commented Sep 14, 2023

What does this PR do?

Add a new metric capturing the number of active goroutines. See commit messages for details.

Motivation

This will help users to investigate goroutine leaks.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • 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.

For Datadog employees:

  • If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

Sorry, something went wrong.

Create a field to wrap runtime.MemStats. This will allow capturing other
metrics coming from different places more easily.
@felixge felixge changed the title Felix.geisendoerfer/prof 8077 goroutine metric profiler: add go_num_goroutine metric Sep 14, 2023
@pr-commenter
Copy link

pr-commenter bot commented Sep 14, 2023

Benchmarks

Benchmark execution time: 2023-09-15 10:04:09

Comparing candidate commit 1ee2035 in PR branch felix.geisendoerfer/PROF-8077-goroutine-metric with baseline commit 3679975 in branch main.

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

@felixge felixge marked this pull request as ready for review September 14, 2023 13:34
@felixge felixge requested a review from a team as a code owner September 14, 2023 13:34
@felixge felixge requested a review from nsrip-dd September 14, 2023 13:39
Copy link
Contributor

@nsrip-dd nsrip-dd left a comment

Choose a reason for hiding this comment

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

LGTM! If you'd like, we can wait until the backend changes are deployed to validate this using the unit-of-work app from this PR? I don't feel strongly about that, though. Up to you :)

@felixge
Copy link
Member Author

felixge commented Sep 15, 2023

I think we should merge it. We can manually kick off a test-app run on main once the backend changes are ready.

Also, let's try out this new merge queue thing, I've been told it's working now.

@felixge
Copy link
Member Author

felixge commented Sep 15, 2023

/merge

@dd-devflow
Copy link

dd-devflow bot commented Sep 15, 2023

🚂 MergeQueue

Pull request added to the queue.

This build is going to start soon! (estimated merge in less than 0s)

you can cancel this operation by commenting your pull request with /merge -c!

@dd-devflow
Copy link

dd-devflow bot commented Sep 15, 2023

🚨 MergeQueue

not able to merge the branch in the target branch

Details

Error: PUT https://api.github.com/repos/DataDog/dd-trace-go/pulls/2217/merge: 405 5 of 5 required status checks are expected. You're not authorized to push to this branch. Visit https://docs.github.com/articles/about-protected-branches/ for more information. []

FullStacktrace:
activity error (type: github.GithubService_MergePullRequest, scheduledEventID: 41, startedEventID: 42, identity: 1@github-worker-96b967b77-knmkl@): PUT https://api.github.com/repos/DataDog/dd-trace-go/pulls/2217/merge: 405 5 of 5 required status checks are expected. You're not authorized to push to this branch. Visit https://docs.github.com/articles/about-protected-branches/ for more information. [] (type: ErrorResponse, retryable: true)

If you need support, contact us on slack #ci-interfaces with those details!

@felixge
Copy link
Member Author

felixge commented Sep 15, 2023

/merge

@dd-devflow
Copy link

dd-devflow bot commented Sep 15, 2023

🚂 MergeQueue

Pull request added to the queue.

This build is going to start soon! (estimated merge in less than 0s)

you can cancel this operation by commenting your pull request with /merge -c!

@dd-devflow
Copy link

dd-devflow bot commented Sep 15, 2023

🚨 MergeQueue

not able to merge the branch in the target branch

Details

Error: PUT https://api.github.com/repos/DataDog/dd-trace-go/pulls/2217/merge: 405 5 of 5 required status checks are expected. []

FullStacktrace:
activity error (type: github.GithubService_MergePullRequest, scheduledEventID: 41, startedEventID: 42, identity: 1@github-worker-96b967b77-ttrnk@): PUT https://api.github.com/repos/DataDog/dd-trace-go/pulls/2217/merge: 405 5 of 5 required status checks are expected. [] (type: ErrorResponse, retryable: true)

If you need support, contact us on slack #ci-interfaces with those details!

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@mimfgg
Copy link
Contributor

mimfgg commented Sep 15, 2023

/merge

@dd-devflow
Copy link

dd-devflow bot commented Sep 15, 2023

🚨 MergeQueue

You are not allowed to use the merge queue towards main.

If you need support, contact us on slack #ci-interfaces with those details!

@felixge
Copy link
Member Author

felixge commented Sep 15, 2023

/merge

@dd-devflow
Copy link

dd-devflow bot commented Sep 15, 2023

🚂 MergeQueue

Pull request added to the queue.

This build is going to start soon! (estimated merge in less than 0s)

you can cancel this operation by commenting your pull request with /merge -c!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants