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

Logcli: Add Support for New Query Path #987

Merged
merged 32 commits into from
Sep 12, 2019

Conversation

joe-elliott
Copy link
Member

@joe-elliott joe-elliott commented Sep 9, 2019

What this PR does / why we need it:

  • Adds support for new query_range api.
  • Refactored logcli for better segregation of parts. Basic code paths/structure has been kept.

Which issue(s) this PR fixes:

Special notes for your reviewer:
The refactor was a medium effort, medium value, low risk change. Certainly more time could be spent building a better, more generic Loki API client for future use.

Checklist

  • Documentation added
  • Tests updated

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
@CLAassistant
Copy link

CLAassistant commented Sep 9, 2019

CLA assistant check
All committers have signed the CLA.

Signed-off-by: Joe Elliott <number101010@gmail.com>
docs/logcli.md Outdated

Args:
<query> eg '{foo="bar",baz="blip"}'
[<regex>]
<query> eg '{foo="bar",baz="blip"}'
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a sample query with a regex filter ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Regex example added to the help output as well as the documentation. Sample query changed to:

'{foo="bar",baz=~".*blip"}'

Copy link
Contributor

@cyriltovena cyriltovena Sep 12, 2019

Choose a reason for hiding this comment

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

This is also nice but I meant '{foo="bar",baz=~".*blip"} |~ ".*error.*"' since we removed the regex argument.

Copy link
Member Author

Choose a reason for hiding this comment

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

Requested query added.

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM. We might have to resolve the conflict with #1009

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
@rfratto rfratto merged commit 4763785 into grafana:master Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants