-
Notifications
You must be signed in to change notification settings - Fork 32
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
Docs: Profiling a backend plugin #996
Conversation
Hello! 👋 This repository uses Auto for releasing packages using PR labels. ✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs. |
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.
Content looks good to me, only a couple of minor comments
|
||
In the [Grafana configuration file](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/) you can configure profiling under a `[plugin.<plugin ID>]` section where `<plugin ID>` is the plugin identifier of your backend plugin you want to profile, e.g. [grafana-github-datasource](https://grafana.com/grafana/plugins/grafana-github-datasource/). | ||
|
||
Running a backend plugin with profiling enabled and without block and mutex profiling enabled should only add a fraction of overhead and is suitable for production or continuous profiling scenarios. Adding a small fraction of block and mutex profiling, such as 10-5 (10%-20%) should in general be fine, but each plugin might vary. |
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.
People (like myself) may not know what block and mutex mean. You probably need to do an intro to what these parameters mean and point to some documentation for more information.
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.
Ah, I see you are explaining this below, then a link to those sections should suffice.
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.
Tried to improve this moving it to its own section. WDYT?
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.
It looks good, it might be a bit confusing to read the whole example but all the parameters are explained below so sounds good to me.
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.
Added a pointer that options are detailed in sub-sections. WDYT?
docusaurus/docs/how-to-guides/data-source-plugins/profiling-backend-plugin.md
Outdated
Show resolved
Hide resolved
docusaurus/docs/how-to-guides/data-source-plugins/profiling-backend-plugin.md
Outdated
Show resolved
Hide resolved
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.
LGTM
This reverts commit d8c5123.
@josmperez feel free to review/take over this since I'm going to be off for 4 weeks after tomorrow. |
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.
I have committed a variety of edits, including a file rename. Please review edits. No showstoppers. LGTM.
Done. I hope you get a chance to take a look at my commits before you go. |
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.
Awesome work on this! 🙌 Leaving only a few small comments :)
docusaurus/docs/how-to-guides/data-source-plugins/profile-backend-plugin.md
Show resolved
Hide resolved
docusaurus/docs/how-to-guides/data-source-plugins/profile-backend-plugin.md
Outdated
Show resolved
Hide resolved
docusaurus/docs/how-to-guides/data-source-plugins/profile-backend-plugin.md
Outdated
Show resolved
Hide resolved
…end-plugin.md Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
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.
LGTM, awesome work!
What this PR does / why we need it:
Document how to profile a backend plugin.
Which issue(s) this PR fixes:
Closes #958
Related to grafana/grafana#90048 and grafana/grafana-plugin-sdk-go#1025
Special notes for your reviewer:
Should probably add the configuration details to https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#pluginplugin_id instead of here?