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
Loki: Improve the display of loki query stats #63623
Conversation
@grafana/observability-logs functionality works as expected just need to fix some tests, can still be reviewed. |
Backend code coverage report for PR #63623 |
Frontend code coverage report for PR #63623
|
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.
Nice! Left some feedback bellow. Also could you please add some tests that will ensure that this fixed functionality works and that we won't break it in the future. 🙂
public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx
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.
I've left couple of comments bellow. Let me know what do you think, mainly about moving running of getStats
to LokiField
instead of LokiOptions
.
public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/components/LokiQueryField.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/querybuilder/components/LokiQueryBuilderOptions.tsx
Outdated
Show resolved
Hide resolved
public/app/plugins/datasource/loki/components/AnnotationsQueryEditor.tsx
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.
Added a comment about making a prop possibly undefined.
I think we might want to prioritize this task, given the upcoming delivery dates. Edit: with "delivery date" I mean query splitting. We may want to have this ready to ship along with that. |
public/app/plugins/datasource/loki/components/monaco-query-field/MonacoQueryField.tsx
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.
Added one last comment, but it's working good! Great work! 🚀
public/app/plugins/datasource/loki/querybuilder/components/LokiQueryCodeEditor.tsx
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!
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.
Let's gooo.
What is this feature?
builder/code
refresh stats on timerange change.code
refresh stats on type.Why do we need this feature?
fixed some bugs and updates stats on type
Who is this feature for?
...
Which issue(s) does this PR fix?:
Fixes #63343
Special notes for your reviewer:
to test
refresh stats on timerange change
, create a query in builder or code then edit the timerange and you should see the stats update.to test
refresh stats on type
, create a query in the code editor, if the query is valid the stats will update after 1 second of no typing.