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

log.WithUserID: log user ID in user label instead of org_id #1634

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [CHANGE] Query-frontend: results cache keys are now versioned, this will cause cache to be re-filled when rolling out this version. #1631
* [CHANGE] Store-gateway: enabled attributes in-memory cache by default. New default configuration is `-blocks-storage.bucket-store.chunks-cache.attributes-in-memory-max-items=50000`. #1727
* [CHANGE] Compactor: Removed the metric `cortex_compactor_garbage_collected_blocks_total` since it duplicates `cortex_compactor_blocks_marked_for_deletion_total`. #1728
* [CHANGE] All: Logs that used the`org_id` label now use `user` label. #1634
* [FEATURE] Ruler: Allow setting `evaluation_delay` for each rule group via rules group configuration file. #1474
* [FEATURE] Ruler: Added support for expression remote evaluation. #1536
* The following CLI flags (and their respective YAML config options) have been added:
Expand Down Expand Up @@ -50,6 +51,7 @@

* [CHANGE] Dashboards: Remove per-user series legends from Tenants dashboard. #1605
* [CHANGE] Dashboards: Show in-memory series and the per-user series limit on Tenants dashboard. #1613
* [CHANGE] Dashboards: Slow-queries dashboard now uses `user` label from logs instead of `org_id`. #1634
* [FEATURE] Alerts: added the following alerts on `mimir-continuous-test` tool: #1676
- `MimirContinuousTestNotRunningOnWrites`
- `MimirContinuousTestNotRunningOnReads`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"span": 12,
"targets": [
{
"expr": "{cluster=~\"$cluster\",namespace=~\"$namespace\",name=~\"query-frontend.*\"} |= \"query stats\" != \"/api/v1/read\" | logfmt | org_id=~\"${tenant_id}\" | response_time > ${min_duration}",
"expr": "{cluster=~\"$cluster\",namespace=~\"$namespace\",name=~\"query-frontend.*\"} |= \"query stats\" != \"/api/v1/read\" | logfmt | user=~\"${tenant_id}\" | response_time > ${min_duration}",
"instant": false,
"legendFormat": "",
"range": true,
Expand Down Expand Up @@ -132,11 +132,11 @@
},
"indexByName": {
"Time range": 3,
"org_id": 1,
"param_query": 2,
"param_step": 4,
"response_time": 5,
"ts": 0
"ts": 0,
"user": 1
},
"renameByName": {
"org_id": "Tenant ID",
Expand Down
4 changes: 2 additions & 2 deletions operations/mimir-mixin/dashboards/slow-queries.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
targets: [
{
// Filter out the remote read endpoint.
expr: '{%s=~"$cluster",namespace=~"$namespace",name=~"query-frontend.*"} |= "query stats" != "/api/v1/read" | logfmt | org_id=~"${tenant_id}" | response_time > ${min_duration}' % $._config.per_cluster_label,
expr: '{%s=~"$cluster",namespace=~"$namespace",name=~"query-frontend.*"} |= "query stats" != "/api/v1/read" | logfmt | user=~"${tenant_id}" | response_time > ${min_duration}' % $._config.per_cluster_label,
instant: false,
legendFormat: '',
range: true,
Expand Down Expand Up @@ -59,7 +59,7 @@ local utils = import 'mixin-utils/utils.libsonnet';
},

// Order fields.
local orderedFields = ['ts', 'org_id', 'param_query', 'Time range', 'param_step', 'response_time'],
local orderedFields = ['ts', 'user', 'param_query', 'Time range', 'param_step', 'response_time'],

indexByName: {
[orderedFields[i]]: i
Expand Down
Loading