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

Loki: log when a query starts in the logql engine #7469

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

slim-bean
Copy link
Collaborator

Signed-off-by: Edward Welch [email protected]

What this PR does / why we need it:

There are cases where a query cannot finish (OOM of a querier/ruler) and most of our logs are emitted upon completion of a query. This can help us find queries which are OOM crashing a component.

Note: It only covers queries executed by the engine, so only instant and range queries. Another PR will be necessary to cover labels/series endpoints. However this approach seemed the best to be able to get this information from ruler executed queries.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

@slim-bean slim-bean requested a review from a team as a code owner October 19, 2022 15:05
Signed-off-by: Edward Welch <[email protected]>
@grafanabot
Copy link
Collaborator

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0.1%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

Copy link
Member

@owen-d owen-d left a comment

Choose a reason for hiding this comment

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

LGTM

@slim-bean slim-bean merged commit 23cc448 into main Oct 24, 2022
@slim-bean slim-bean deleted the log-when-we-start-executing-query branch October 24, 2022 19:35
lxwzy pushed a commit to lxwzy/loki that referenced this pull request Nov 7, 2022
Signed-off-by: Edward Welch <[email protected]>

**What this PR does / why we need it**:

There are cases where a query cannot finish (OOM of a querier/ruler) and
most of our logs are emitted upon completion of a query. This can help
us find queries which are OOM crashing a component.

Note: It only covers queries executed by the engine, so only instant and
range queries. Another PR will be necessary to cover labels/series
endpoints. However this approach seemed the best to be able to get this
information from ruler executed queries.

**Which issue(s) this PR fixes**:
Fixes #<issue number>

**Special notes for your reviewer**:

**Checklist**
- [ ] Reviewed the `CONTRIBUTING.md` guide
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

Signed-off-by: Edward Welch <[email protected]>
changhyuni pushed a commit to changhyuni/loki that referenced this pull request Nov 8, 2022
Signed-off-by: Edward Welch <[email protected]>

**What this PR does / why we need it**:

There are cases where a query cannot finish (OOM of a querier/ruler) and
most of our logs are emitted upon completion of a query. This can help
us find queries which are OOM crashing a component.

Note: It only covers queries executed by the engine, so only instant and
range queries. Another PR will be necessary to cover labels/series
endpoints. However this approach seemed the best to be able to get this
information from ruler executed queries.

**Which issue(s) this PR fixes**:
Fixes #<issue number>

**Special notes for your reviewer**:

**Checklist**
- [ ] Reviewed the `CONTRIBUTING.md` guide
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

Signed-off-by: Edward Welch <[email protected]>
Abuelodelanada pushed a commit to canonical/loki that referenced this pull request Dec 1, 2022
Signed-off-by: Edward Welch <[email protected]>

**What this PR does / why we need it**:

There are cases where a query cannot finish (OOM of a querier/ruler) and
most of our logs are emitted upon completion of a query. This can help
us find queries which are OOM crashing a component.

Note: It only covers queries executed by the engine, so only instant and
range queries. Another PR will be necessary to cover labels/series
endpoints. However this approach seemed the best to be able to get this
information from ruler executed queries.

**Which issue(s) this PR fixes**:
Fixes #<issue number>

**Special notes for your reviewer**:

**Checklist**
- [ ] Reviewed the `CONTRIBUTING.md` guide
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

Signed-off-by: Edward Welch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants