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

Metrics gotemplate support, debug bundle features #9067

Merged
merged 14 commits into from
Oct 14, 2020
Merged

Conversation

davemay99
Copy link
Contributor

@davemay99 davemay99 commented Oct 10, 2020

nomad operator metrics

  • Add function to return complete MetricsSummary struct, to provide plumbing for gotemplate and future summary output
  • Add gotemplate support

nomad operator debug

  • Add -server-id=all for easy capture from all servers
  • Add goroutine pprof text output type 1 and 2
  • Fix metrics output bug introduced when changing from string to byte array

misc

  • Additional test coverage
  • make sync

@vercel
Copy link

vercel bot commented Oct 10, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hashicorp/nomad/p31zxug7n
✅ Preview: https://nomad-git-dmay-debug-features.hashicorp.vercel.app

@davemay99 davemay99 changed the title Metrics - add gotemplate support and MetricsSummary struct Metrics gotemplate support, debug bundle features Oct 10, 2020
api/operator.go Outdated Show resolved Hide resolved
Copy link
Contributor

@drewbailey drewbailey left a comment

Choose a reason for hiding this comment

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

This looks great! one question and a stylistic nit :D

Co-authored-by: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
Copy link
Contributor

@drewbailey drewbailey left a comment

Choose a reason for hiding this comment

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

This looks great, nicely done @davemay99, looks like the lint check is complaining, I think you just need a make sync and it should be good to go

Copy link
Contributor Author

@davemay99 davemay99 left a comment

Choose a reason for hiding this comment

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

Not sure why the CircleCI test failed. I pulled a fresh clone, ran make sync, and no changes were made. I reran the failed CircleCI test and it ran to completion successfully, so I think this is ready to go.

Copy link
Contributor

@drewbailey drewbailey left a comment

Choose a reason for hiding this comment

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

🚀

@davemay99 davemay99 merged commit 71a022a into master Oct 14, 2020
@davemay99 davemay99 deleted the dmay-debug-features branch October 14, 2020 19:16
fredrikhgrelland pushed a commit to fredrikhgrelland/nomad that referenced this pull request Oct 22, 2020
* add goroutine text profiles to nomad operator debug

* add server-id=all to nomad operator debug

* fix bug from changing metrics from string to []byte

* Add function to return MetricsSummary struct, metrics gotemplate support

* fix bug resolving 'server-id=all' when no servers are available

* add url to operator_debug tests

* removed test section which is used for future operator_debug.go changes

* separate metrics from operator, use only structs from go-metrics

* ensure parent directories are created as needed

* add suggested comments for text debug pprof

* move check down to where it is used

* add WaitForFiles helper function to wait for multiple files to exist

* compact metrics check

Co-authored-by: Drew Bailey <2614075+drewbailey@users.noreply.github.com>

* fix github's silly apply suggestion

Co-authored-by: Drew Bailey <2614075+drewbailey@users.noreply.github.com>
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants