Skip to content

Commit

Permalink
remove query statements from dashboard files; remove filter values fr…
Browse files Browse the repository at this point in the history
…om charts; update docker-compose healthcheck; apply formatting
  • Loading branch information
ruthenian8 committed Oct 24, 2023
1 parent 9bfaeac commit d73b8d4
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ params:
slice_id: 13
granularity_sqla: start_time
time_grain_sqla: PT1M
time_range: 'DATEADD(DATETIME("now"), -1, day) : now'
time_range: No filter
metrics:
- aggregate: COUNT
column:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ params:
slice_id: 2
granularity_sqla: start_time
time_grain_sqla: PT1M
time_range: 'DATEADD(DATETIME("now"), -1, day) : now'
time_range: No filter
metrics:
- aggregate: COUNT
column:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,7 @@ default_endpoint: null
offset: 0
cache_timeout: null
schema: test
sql: "\nWITH main AS (\n SELECT DISTINCT otel_logs.LogAttributes['context_id']\
\ as context_id,\n otel_logs.LogAttributes['request_id'] as request_id,\n \
\ toDateTime(otel_traces.Timestamp) as start_time,\n otel_traces.SpanName as\
\ data_key,\n otel_logs.Body as data,\n JSON_VALUE(otel_logs.Body, '$.label')\
\ as label,\n JSON_VALUE(otel_logs.Body, '$.flow') as flow_label,\n JSON_VALUE(otel_logs.Body,\
\ '$.node') as node_label,\n otel_logs.TraceId as trace_id,\n otel_traces.TraceId\n\
FROM otel_logs, otel_traces\n WHERE otel_logs.TraceId = otel_traces.TraceId and\
\ data_key = 'get_current_label'\n ORDER BY context_id, request_id\n) SELECT\
\ context_id,\n request_id,\n start_time,\n data_key,\n data,\n label,\n\
\ (request_id != '0' ? neighbor(label, -1) : '') as prev_label,\n (request_id != '0' ? neighbor(flow_label, -1) : '') as prev_flow,\n\
\ flow_label,\n node_label\nFROM main\n"
sql: null
params: null
template_params: null
filter_select_enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ default_endpoint: null
offset: 0
cache_timeout: null
schema: test
sql: "WITH main AS (\n SELECT DISTINCT otel_logs.LogAttributes['context_id'] as\
\ context_id,\n otel_logs.LogAttributes['request_id'] as request_id,\n toDateTime(otel_traces.Timestamp)\
\ as start_time,\n otel_traces.SpanName as data_key,\n otel_logs.Body as data,\n\
\ JSON_VALUE(otel_logs.Body, '$.label') as label,\n JSON_VALUE(otel_logs.Body,\
\ '$.flow') as flow_label,\n JSON_VALUE(otel_logs.Body, '$.node') as node_label,\n\
\ otel_logs.TraceId as trace_id,\n otel_traces.TraceId\nFROM otel_logs, otel_traces\n\
\ WHERE otel_logs.TraceId = otel_traces.TraceId\n ORDER BY data_key, context_id,\
\ request_id\n) SELECT context_id,\n request_id,\n start_time,\n data_key,\n\
\ data,\n label,\n neighbor(label, -1) as prev_label,\n neighbor(flow_label,\
\ -1) as prev_flow,\n flow_label,\n node_label\nFROM main"
sql: null
params: null
template_params: null
filter_select_enabled: false
Expand Down
8 changes: 4 additions & 4 deletions dff/stats/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ def make_zip_config(parsed_args: argparse.Namespace) -> Path:
params = dict(
table="${db.table}",
label_lag="lagInFrame(label) OVER "
"(PARTITION BY context_id ORDER BY request_id ASC "
"ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)",
"(PARTITION BY context_id ORDER BY request_id ASC "
"ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)",
flow_lag="lagInFrame(flow_label) OVER "
"(PARTITION BY context_id ORDER BY request_id ASC "
"ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)",
"(PARTITION BY context_id ORDER BY request_id ASC "
"ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)",
texttype="String",
lblfield="JSON_VALUE(${db.table}.Body, '$.label')",
flowfield="JSON_VALUE(${db.table}.Body, '$.flow')",
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ services:
- ch-data:/var/lib/clickhouse/
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:8123/ping || exit 1
interval: 2s
timeout: 2s
interval: 5s
timeout: 4s
retries: 5
otelcol:
image: otel/opentelemetry-collector-contrib:latest
Expand Down

0 comments on commit d73b8d4

Please sign in to comment.