MCPcopy Create free account
hub / github.com/PostHog/duckgres / QueryLogger

Struct QueryLogger

server/querylog.go:63–70  ·  view source on GitHub ↗

QueryLogger batches query log entries and writes them to a DuckLake table.

Source from the content-addressed store, hash-verified

61
62var newPostgresQueryLogSink = func(ctx context.Context, cfg Config) (QueryLogSink, error) {
63 return NewPostgresQueryLoggerContext(ctx, cfg.DuckLake, cfg.QueryLog)
64}
65
66// NewQueryLogSink creates the native Postgres-backed query-log sink.
67func NewQueryLogSink(cfg Config) (QueryLogSink, error) {
68 if !cfg.QueryLog.Enabled || cfg.DuckLake.MetadataStore == "" {
69 return nil, nil
70 }
71 ctx, cancel := context.WithTimeout(context.Background(), queryLogInitTimeout)
72 defer cancel()
73 return newPostgresQueryLogSink(ctx, cfg)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected