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

feat(query): update query processing to support new grafana dashboard #135

Merged
merged 7 commits into from
Sep 29, 2022

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented Sep 28, 2022

Fixes #128
Fixes #129
Fixes #130
Fixes #134
Fixes #78
Fixes #62
Related to cryostatio/cryostat-grafana-dashboard#12

What's new?

  • Queries now support url-parameter-styled target (Only timeseries). This is primarily used to categorize plots based on a field of the same event. For example:

    {
      "target": " jdk.ObjectAllocationSample.weight?objectClass=java.lang.String,java.util.ArrayList",
      "refId":"A",
      "type":"timeserie"
    }

    Use case: individual plots on jdk.ObjectAllocationSample.weight for each class type using variables & single panel with all plots identified by legends.

  • /search endpoint was corrected to accept POST with search target in request body. SimpleJson plugin was not clear about this, but another similar alternative explains well: https://grafana.com/grafana/plugins/simpod-json-datasource/. For example:

    $ curl -X POST --data '{ "target": "jdk.ObjectAllocationSample.classObject" }' localhost:8080/search

    Use case: used to defined a variable that can be reference in queries. See posts on grafana variables: https://grafana.com/docs/grafana/latest/dashboards/variables/

  • A well-known unit is defined for returned data:

    • memory: BYTE
    • timespan: MILISECOND
    • frequency: Hz
    • Others (e.g. counts, epochMs): no change
  • Non-numeric fields are also returned as data points if specified. Some fields are not string (i.e. JSON) so it is on the "query-er" to do transformation/override.

  • Recording metadata (i.e. recordingDuration and startTime) does not depends on jdk.ActiveRecording event. See Andrew's comment. This helps panel of these information persist across time frame changes and avoid overlapping of other recordings.

  • Test resources (i.e. test recording) are updated to support new event jdk.ObjectAllocationSample.

See corresponding Grafana updates: cryostatio/cryostat-grafana-dashboard#12

@tthvo tthvo force-pushed the redesign-dashboard branch from 78211cd to 473a12d Compare September 29, 2022 05:33
@tthvo tthvo marked this pull request as ready for review September 29, 2022 05:38
README.md Outdated Show resolved Hide resolved
Copy link
Member

@maxcao13 maxcao13 left a comment

Choose a reason for hiding this comment

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

I'm wondering if it's possible to set the time range automatically when "setting" the file?

@tthvo
Copy link
Member Author

tthvo commented Sep 29, 2022

I'm wondering if it's possible to set the time range automatically when "setting" the file?

Related to cryostatio/cryostat-grafana-dashboard#13. Unfortunately, I am not sure they implemented the feature yet :\

@tthvo
Copy link
Member Author

tthvo commented Sep 29, 2022

No support for /annotations route yet but its route should serve POST for compatibility with plugin.

@andrewazores andrewazores merged commit b39cef2 into cryostatio:main Sep 29, 2022
@tthvo tthvo deleted the redesign-dashboard branch September 29, 2022 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
No open projects
Status: Done
3 participants