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

Enable Request Logging for Thanos in Observatorium #556

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
86 changes: 86 additions & 0 deletions resources/services/observatorium-metrics-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ objects:
- --downsample.concurrency=1
- --deduplication.replica-label=replica
- --debug.max-compaction-level=3
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
- ${THANOS_COMPACTOR_RETENTION_DISABLE_DOWNSAMPLING}
env:
- name: OBJSTORE_CONFIG
Expand Down Expand Up @@ -1171,6 +1178,13 @@ objects:
- --grpc.proxy-strategy=${THANOS_QUERIER_PROXY_STRATEGY}
- --query.promql-engine=${THANOS_QUERIER_ENGINE}
- --query.max-concurrent=${THANOS_QUERIER_MAX_CONCURRENT}
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: HOST_IP_ADDRESS
valueFrom:
Expand Down Expand Up @@ -1495,6 +1509,13 @@ objects:
- --labels.max-retries-per-request=${THANOS_QUERY_FRONTEND_MAX_RETRIES}
- --labels.default-time-range=336h
- --cache-compression-type=snappy
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: HOST_IP_ADDRESS
valueFrom:
Expand Down Expand Up @@ -1825,6 +1846,13 @@ objects:
- --configmap-generated-name=observatorium-thanos-receive-controller-tenants-generated
- --file-name=hashrings.json
- --namespace=$(NAMESPACE)
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: NAMESPACE
valueFrom:
Expand Down Expand Up @@ -2085,6 +2113,13 @@ objects:
- --receive.grpc-compression=none
- --receive.hashrings-algorithm=${THANOS_RECEIVE_HASHRINGS_ALGORITHM}
- --receive.hashrings-file-refresh-interval=5s
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: NAME
valueFrom:
Expand Down Expand Up @@ -2567,6 +2602,13 @@ objects:
"sampler_type": "ratelimiting"
"service_name": "thanos-rule"
"type": "JAEGER"
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: NAME
valueFrom:
Expand Down Expand Up @@ -3143,6 +3185,13 @@ objects:
- --store.grpc.touched-series-limit=${THANOS_STORE_SERIES_TOUCHED_LIMIT}
- --store.grpc.series-sample-limit=${THANOS_STORE_SERIES_SAMPLE_LIMIT}
- --max-time=${THANOS_STORE_MAX_TIME}
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: OBJSTORE_CONFIG
valueFrom:
Expand Down Expand Up @@ -3400,6 +3449,13 @@ objects:
- --store.grpc.touched-series-limit=${THANOS_STORE_SERIES_TOUCHED_LIMIT}
- --store.grpc.series-sample-limit=${THANOS_STORE_SERIES_SAMPLE_LIMIT}
- --max-time=${THANOS_STORE_MAX_TIME}
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: OBJSTORE_CONFIG
valueFrom:
Expand Down Expand Up @@ -3657,6 +3713,13 @@ objects:
- --store.grpc.touched-series-limit=${THANOS_STORE_SERIES_TOUCHED_LIMIT}
- --store.grpc.series-sample-limit=${THANOS_STORE_SERIES_SAMPLE_LIMIT}
- --max-time=${THANOS_STORE_MAX_TIME}
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: OBJSTORE_CONFIG
valueFrom:
Expand Down Expand Up @@ -3914,6 +3977,13 @@ objects:
- --store.grpc.touched-series-limit=${THANOS_STORE_SERIES_TOUCHED_LIMIT}
- --store.grpc.series-sample-limit=${THANOS_STORE_SERIES_SAMPLE_LIMIT}
- --max-time=${THANOS_STORE_MAX_TIME}
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: OBJSTORE_CONFIG
valueFrom:
Expand Down Expand Up @@ -4171,6 +4241,13 @@ objects:
- --store.grpc.touched-series-limit=${THANOS_STORE_SERIES_TOUCHED_LIMIT}
- --store.grpc.series-sample-limit=${THANOS_STORE_SERIES_SAMPLE_LIMIT}
- --max-time=${THANOS_STORE_MAX_TIME}
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: OBJSTORE_CONFIG
valueFrom:
Expand Down Expand Up @@ -4428,6 +4505,13 @@ objects:
- --store.grpc.touched-series-limit=${THANOS_STORE_SERIES_TOUCHED_LIMIT}
- --store.grpc.series-sample-limit=${THANOS_STORE_SERIES_SAMPLE_LIMIT}
- --max-time=${THANOS_STORE_MAX_TIME}
- |-
--request.logging-config="grpc":
"options":
"decision":
"log_end": true
"log_start": true
"level": "${THANOS_REQUEST_LOGGING_LEVEL}"
env:
- name: OBJSTORE_CONFIG
valueFrom:
Expand Down Expand Up @@ -4854,3 +4938,5 @@ parameters:
value: 1Gi
- name: THANOS_VOLCANO_MEMORY_REQUEST
value: 256Mi
- name: THANOS_REQUEST_LOGGING_LEVEL
value: INFO
26 changes: 25 additions & 1 deletion services/observatorium-metrics-template-overwrites.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ local oauthProxy = import './sidecars/oauth-proxy.libsonnet';
local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';

{
local request_logging = std.manifestYamlDoc({
grpc: {
options: {
level: '${THANOS_REQUEST_LOGGING_LEVEL}',
decision: {
log_start: true,
log_end: true,
},
},
},
}),
local s3EnvVars = [
{
name: 'AWS_ACCESS_KEY_ID',
Expand Down Expand Up @@ -92,7 +103,10 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';
// Temporary workaround on high cardinality blocks for 2w.
// Since we have only 2w retention, there is no point in having 2w blocks.
// See: https://issues.redhat.com/browse/OBS-437
args+: ['--debug.max-compaction-level=3'] + disableDownsamplingFlag,
args+: [
'--debug.max-compaction-level=3',
'--request.logging-config=' + request_logging,
] + disableDownsamplingFlag,
} else c
for c in super.containers
],
Expand Down Expand Up @@ -127,6 +141,9 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';
failureThreshold: 10,
periodSeconds: 120,
},
args+: [
'--request.logging-config=' + request_logging,
],
} else c
for c in super.containers
],
Expand Down Expand Up @@ -171,6 +188,7 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';
'--store.grpc.touched-series-limit=${THANOS_STORE_SERIES_TOUCHED_LIMIT}',
'--store.grpc.series-sample-limit=${THANOS_STORE_SERIES_SAMPLE_LIMIT}',
'--max-time=${THANOS_STORE_MAX_TIME}',
'--request.logging-config=' + request_logging,
],
} else c
for c in super.containers
Expand All @@ -191,6 +209,9 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';
containers: [
if c.name == 'thanos-receive-controller' then c {
securityContext: {},
args+: [
'--request.logging-config=' + request_logging,
],
} else c
for c in super.containers
],
Expand Down Expand Up @@ -268,6 +289,7 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';
'--grpc.proxy-strategy=${THANOS_QUERIER_PROXY_STRATEGY}',
'--query.promql-engine=${THANOS_QUERIER_ENGINE}',
'--query.max-concurrent=${THANOS_QUERIER_MAX_CONCURRENT}',
'--request.logging-config=' + request_logging,
],
} else c
for c in super.containers
Expand Down Expand Up @@ -431,6 +453,7 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';
'--labels.max-retries-per-request=%s' % '${THANOS_QUERY_FRONTEND_MAX_RETRIES}',
'--labels.default-time-range=336h',
'--cache-compression-type=snappy',
'--request.logging-config=' + request_logging,
],
} else c
for c in super.containers
Expand Down Expand Up @@ -458,6 +481,7 @@ local thanosRuleSyncer = import './sidecars/thanos-rule-syncer.libsonnet';
'--receive.grpc-compression=none',
'--receive.hashrings-algorithm=${THANOS_RECEIVE_HASHRINGS_ALGORITHM}',
'--receive.hashrings-file-refresh-interval=5s',
'--request.logging-config=' + request_logging,
],
env+: s3EnvVars + [{
name: 'DEBUG',
Expand Down
Loading