Skip to content

Commit 38d715c

Browse files
haiyuan-eng-googlecopybara-github
authored andcommitted
feat(plugins): add otel correlation, custom_metadata allowlist, and column projection to BigQuery analytics
Add three additive, off-by-default observability controls to BigQueryAgentAnalyticsPlugin: - Span-level Cloud Trace correlation: opt in via `enable_otel_correlation` (default off) to capture the ambient OpenTelemetry span context into attributes.otel.{span_id,trace_id} when valid (a best-effort join key). The typed span_id/parent_span_id columns remain the plugin's internal execution tree; their schema descriptions are corrected to say so and to point consumers at attributes.otel.span_id for span-level joins. No plugin-owned span is created. - custom_metadata_allowlist: capture allowlisted event.custom_metadata keys (exact keys, or explicit "prefix:*" patterns) into attributes.custom_metadata.* through the existing truncation + sensitive-key redaction pipeline. Truncation sets is_truncated; redaction does not. - payload_column_denylist: project payload columns (content, content_parts, attributes, latency_ms) out of the table at write time. Applied schema-first so the table schema, Arrow schema, row dict, and views stay consistent; identity/correlation columns are protected and raise ValueError. Denying content_parts disables GCS offload, and denying attributes alongside a non-empty custom_metadata_allowlist is rejected. Default behavior is unchanged when none of the three configs are set. Co-authored-by: Haiyuan Cao <haiyuan@google.com> PiperOrigin-RevId: 940629822
1 parent 56b84e1 commit 38d715c

2 files changed

Lines changed: 812 additions & 30 deletions

File tree

0 commit comments

Comments
 (0)