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

[Request] Can the Object Allocation sub-dashboard have dynamic categories? #69

Closed
andrewazores opened this issue Jul 8, 2024 · 3 comments
Labels
feat New feature or request question Further information is requested

Comments

@andrewazores
Copy link
Member

See #12

Currently, the sub-dashboard that splits out object allocations into separate panels for different classes does so by simply containing a hardcoded list of classes that are filtered for. For example, int[] here:

However, on the main dashboard, this is done with a wildcard query:

"target": "jdk.ObjectAllocationSample.weight?objectClass=*",

Is there a way to dynamically generate the sub-dashboard so that it has separate panels for each class in the dataset?

Right now, the main dashboard panel for allocations is complete and accurate to the underlying JFR data, but it can be hard to read because the data is too dense. The sub-dashboard splits it out, reducing the density and making it legible, but it is actually representing incomplete data because any class that is not hardcoded to the layout will not be rendered at all.

@andrewazores andrewazores added question Further information is requested feat New feature or request labels Jul 8, 2024
@andrewazores
Copy link
Member Author

Actually, it seems that the sub-dashboard does somehow pick up on additional classes that are not hardcoded already - though I'm not really sure how. Need to investigate more into variable templating and things, I think.

@tthvo
Copy link
Member

tthvo commented Jul 8, 2024

Actually, it seems that the sub-dashboard does somehow pick up on additional classes that are not hardcoded already - though I'm not really sure how. Need to investigate more into variable templating and things, I think.

I remember (vaguely) this is indeed done using Grafana variables, which calls the data-source /search endpoint:
https://github.com/grafana/simple-json-datasource?tab=readme-ov-file#search-api. This variable is then templated into the panel query ${objectClass}.

image

@andrewazores
Copy link
Member Author

Ah thanks @tthvo , I had figured out the variable templating bit but the /search hint helped me fix something else I was doing wrong :-)

bdbef63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

2 participants