Skip to content
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
1 change: 1 addition & 0 deletions include/config/guc.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ extern int psch_min_duration_us;
extern int psch_normalize_cache_max;
extern double psch_sample_rate;
extern bool psch_otel_arrow_passthrough;
extern bool psch_use_unified_arrow_exporter;
extern int psch_otel_max_block_bytes;
extern char* psch_extra_attributes;
extern char* psch_debug_arrow_dump_dir;
Expand Down
18 changes: 18 additions & 0 deletions src/config/guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ int psch_min_duration_us = 0;
int psch_normalize_cache_max = 32768;
double psch_sample_rate = 1.0;
bool psch_otel_arrow_passthrough = false;
bool psch_use_unified_arrow_exporter = false;
int psch_otel_max_block_bytes = 3 * 1024 * 1024; // 3 MiB (max: 16 MiB)
char* psch_extra_attributes = NULL;
char* psch_debug_arrow_dump_dir = NULL;
Expand Down Expand Up @@ -356,6 +357,23 @@ void PschInitGuc(void) {
0,
NULL, NULL, NULL);

DefineCustomBoolVariable(
"pg_stat_ch.use_unified_arrow_exporter",
"Use the StatsExporter-implementing Arrow exporter instead of arrow_batch.cc.",
"When enabled together with use_otel and otel_arrow_passthrough, the bgworker "
"builds Arrow IPC via the typed StatsExporter column interface, writing the "
"events_raw schema (typed integer ids, no sprintf decimal-string encoding). "
"When off, the legacy arrow_batch.cc path runs and produces the query_logs_arrow "
"wire shape. Default off; flip on to opt a producer into the new exporter. "
"PGC_POSTMASTER: the bgworker picks the exporter implementation at init time, "
"so a runtime change would mismatch the per-cycle dispatcher (Arrow batches "
"would silently drop, since OTelArrowExporter does not implement SendArrowBatch).",
Comment on lines +368 to +370
&psch_use_unified_arrow_exporter,
false,
PGC_POSTMASTER,
0,
NULL, NULL, NULL);

DefineCustomIntVariable(
"pg_stat_ch.otel_max_block_bytes",
"Maximum Arrow batch size in bytes per OTLP request.",
Expand Down
Loading
Loading