BigQueryLoggerConfig

data class BigQueryLoggerConfig @JvmOverloads constructor(val projectId: String, val datasetId: String, val enabled: Boolean = true, val location: String = "US", val tableName: String = "agent_events", val credentials: Credentials? = null, val eventAllowlist: Set<String> = emptySet(), val eventDenylist: Set<String> = emptySet(), val maxContentLength: Int = 500 * 1024, val clusteringFields: List<String> = BigQuerySchema.getDefaultClusteringFields(), val logMultiModalContent: Boolean = true, val logSessionMetadata: Boolean = true, val customTags: Map<String, Any?> = emptyMap(), val autoSchemaUpgrade: Boolean = true, val createViews: Boolean = false, val viewPrefix: String = "v", val contentFormatter: (Any, String) -> Any?? = null)

Configuration for the BigQueryAgentAnalyticsPlugin.

Constructors

Link copied to clipboard
constructor(projectId: String, datasetId: String, enabled: Boolean = true, location: String = "US", tableName: String = "agent_events", credentials: Credentials? = null, eventAllowlist: Set<String> = emptySet(), eventDenylist: Set<String> = emptySet(), maxContentLength: Int = 500 * 1024, clusteringFields: List<String> = BigQuerySchema.getDefaultClusteringFields(), logMultiModalContent: Boolean = true, logSessionMetadata: Boolean = true, customTags: Map<String, Any?> = emptyMap(), autoSchemaUpgrade: Boolean = true, createViews: Boolean = false, viewPrefix: String = "v", contentFormatter: (Any, String) -> Any?? = null)

Types

Link copied to clipboard
class Builder

Fluent builder for BigQueryLoggerConfig, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether to add missing columns to an existing table, which needs the bigquery.tables.update permission; rows are dropped until the upgrade succeeds. When off, the table must already have every column.

Link copied to clipboard

Clustering columns for a newly created table.

Link copied to clipboard

Called with each event's content and type; its result is logged in place of the content. If it throws, [FORMATTER_FAILED] is logged instead.

Link copied to clipboard

Whether to create or replace one view per event type when the first event is logged.

Link copied to clipboard

Credentials for BigQuery; null uses Application Default Credentials.

Link copied to clipboard

Tags logged with every event under attributes.custom_tags.

Link copied to clipboard

BigQuery dataset that holds the events table.

Link copied to clipboard

Whether the plugin logs anything.

Link copied to clipboard

Event types to log, such as LLM_REQUEST; empty logs every type.

Link copied to clipboard

Event types never to log, even when allowlisted.

Link copied to clipboard

BigQuery location of the dataset, such as US.

Link copied to clipboard

Whether to fill the content_parts column.

Link copied to clipboard

Whether to log the session ids and state under attributes.session_metadata.

Link copied to clipboard

Budget for each logged string in UTF-8 bytes, including the ...[TRUNCATED] marker; -1 is unlimited.

Link copied to clipboard

Google Cloud project that holds the dataset.

Link copied to clipboard

Events table, created on first use if it does not exist.

Link copied to clipboard

Prefix of the view names, so v gives v_llm_request. Views are skipped if this prefix or the table's project, dataset or name has characters other than letters, digits, _ and -.

Functions

Link copied to clipboard

Returns a Builder initialized with this instance's properties, primarily for Java callers. Prefer it over copy from Java: copy takes every property positionally, so its signature changes whenever a property is added.