[PR #3809] [MERGED] docs(python/callbacks): refresh BigQuery callback page for shipped API #3826

Closed
opened 2026-06-05 18:53:17 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3809
Author: @caohy1988
Created: 4/29/2026
Status: Merged
Merged: 4/30/2026
Merged by: @mdrxy

Base: mainHead: docs/bigquery-callback-refresh-and-jslink


📝 Commits (4)

  • eb72779 docs(python/callbacks): refresh BigQuery callback page for shipped API
  • 32ebe8f docs(python/callbacks): fix BigQuery auto-view column table
  • f804c7b docs(python/callbacks): correct content-shape examples for BigQuery events
  • 3076f4e docs(python/callbacks): drop usage from LLM_RESPONSE content; fix RETRIEVER_ERROR shape

📊 Changes

1 file changed (+205 additions, -66 deletions)

View changed files

📝 src/oss/python/integrations/callbacks/google_bigquery.mdx (+205 -66)

📄 Description

Refreshes /oss/python/integrations/callbacks/google_bigquery so it matches the BigQueryCallbackHandler API as it actually shipped in langchain-ai/langchain-google#1721 and langchain-ai/langchain-google#1740. Mirrors the README in the upstream package.

Why

Following along the published Python BigQuery callback page today drops users into stale APIs:

  • Event names: GRAPH_START/GRAPH_END/GRAPH_ERROR and NODE_STARTING/NODE_COMPLETED/NODE_ERROR (renamed to INVOCATION_* and AGENT_* in #1721 to match Google ADK's BigQueryAgentAnalyticsPlugin).
  • Default table: agent_events_v2 (renamed to agent_events in #1740).
  • Six new BigQueryLoggerConfig options shipped in #1721 (custom_tags, log_session_metadata, content_formatter, auto_schema_upgrade, create_views, view_prefix) plus skip_internal_chain_events — none of which appeared on the page.
  • Auto-created v_* analytics views, sub-agent attribution, flush(), model_version / usage_metadata / cache_metadata / llm_config / tools enrichment — all ADK-parity features missing from the page.
  • One stale USER_MESSAGE_RECEIVED reference (an ADK-only event the LangChain handler doesn't emit).

What changed

Section Change
Key features Rewritten to call out auto-views, auto schema upgrade, sub-agent attribution, rich LLM telemetry, skip_internal_chain_events, and flush().
Use with LangGraph agent Code sample updated: drops the explicit table_id="agent_events_v2" (now the default), shows custom_tags, demonstrates flush(timeout=5.0) between requests.
Configuration options Extended with the 7 new options. table_id default updated to agent_events.
NEW: Auto-created analytics views Lists each v_* view and the typed columns it exposes.
NEW: Auto schema upgrade Documents the additive ALTER TABLE ADD COLUMN behavior gated by the langchain_bq_schema_version table label.
NEW: Sub-agent attribution Documents the agent → langgraph_node → checkpoint_ns → graph_name fallback chain.
Event types and payloads LLM_RESPONSE attributes now mention usage, model_version, usage_metadata, cache_metadata. LLM_REQUEST mentions llm_config + tools. New AGENT_* / INVOCATION_* table. Tool usage table fixed to show the actual {tool, input/result} JSON shape.
Advanced SQL examples Sweep stale event names. Sessionize-conversation view fixed (no more USER_MESSAGE_RECEIVED). Tool-name path fixed ($.tool not $.tool_name in content).
LangGraph integration Event-type table updated to AGENT_* / INVOCATION_*. Code sample uses the renamed events.

Total: 172 insertions, 53 deletions in one file. Net 25 stale tokens swept (GRAPH_*, NODE_*, agent_events_v2, USER_MESSAGE_RECEIVED).

Test plan

  • Page renders as valid MDX (no broken frontmatter, code fences, or tables).
  • All JSON_VALUE paths in the SQL examples match the actual JSON shape the handler emits (verified against _build_content in bigquery_callback.py).
  • All event_type literals in code/SQL examples are types the handler actually emits.
  • Zero remaining stale references (grep -cE "GRAPH_(START|END|ERROR)|NODE_(STARTING|COMPLETED|ERROR)|agent_events_v2|USER_MESSAGE_RECEIVED" returns 0).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/3809 **Author:** [@caohy1988](https://github.com/caohy1988) **Created:** 4/29/2026 **Status:** ✅ Merged **Merged:** 4/30/2026 **Merged by:** [@mdrxy](https://github.com/mdrxy) **Base:** `main` ← **Head:** `docs/bigquery-callback-refresh-and-jslink` --- ### 📝 Commits (4) - [`eb72779`](https://github.com/langchain-ai/docs/commit/eb727798748ead9431d2e17b365decd6077c11b6) docs(python/callbacks): refresh BigQuery callback page for shipped API - [`32ebe8f`](https://github.com/langchain-ai/docs/commit/32ebe8ff75a616f7328f2c8a93eaa43db4e12788) docs(python/callbacks): fix BigQuery auto-view column table - [`f804c7b`](https://github.com/langchain-ai/docs/commit/f804c7bcef976e16fdf6a815561cfa8d5fa31c6f) docs(python/callbacks): correct content-shape examples for BigQuery events - [`3076f4e`](https://github.com/langchain-ai/docs/commit/3076f4e8e0b430f67b03f73c182e8fc00aea833f) docs(python/callbacks): drop usage from LLM_RESPONSE content; fix RETRIEVER_ERROR shape ### 📊 Changes **1 file changed** (+205 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/python/integrations/callbacks/google_bigquery.mdx` (+205 -66) </details> ### 📄 Description Refreshes [`/oss/python/integrations/callbacks/google_bigquery`](https://docs.langchain.com/oss/python/integrations/callbacks/google_bigquery) so it matches the ``BigQueryCallbackHandler`` API as it actually shipped in [langchain-ai/langchain-google#1721](https://github.com/langchain-ai/langchain-google/pull/1721) and [langchain-ai/langchain-google#1740](https://github.com/langchain-ai/langchain-google/pull/1740). Mirrors the README in the upstream package. ## Why Following along the published Python BigQuery callback page today drops users into stale APIs: - Event names: `GRAPH_START`/`GRAPH_END`/`GRAPH_ERROR` and `NODE_STARTING`/`NODE_COMPLETED`/`NODE_ERROR` (renamed to `INVOCATION_*` and `AGENT_*` in #1721 to match Google ADK's `BigQueryAgentAnalyticsPlugin`). - Default table: `agent_events_v2` (renamed to `agent_events` in #1740). - Six new `BigQueryLoggerConfig` options shipped in #1721 (`custom_tags`, `log_session_metadata`, `content_formatter`, `auto_schema_upgrade`, `create_views`, `view_prefix`) plus `skip_internal_chain_events` — none of which appeared on the page. - Auto-created `v_*` analytics views, sub-agent attribution, `flush()`, `model_version` / `usage_metadata` / `cache_metadata` / `llm_config` / `tools` enrichment — all ADK-parity features missing from the page. - One stale `USER_MESSAGE_RECEIVED` reference (an ADK-only event the LangChain handler doesn't emit). ## What changed | Section | Change | |---|---| | **Key features** | Rewritten to call out auto-views, auto schema upgrade, sub-agent attribution, rich LLM telemetry, `skip_internal_chain_events`, and `flush()`. | | **Use with LangGraph agent** | Code sample updated: drops the explicit `table_id="agent_events_v2"` (now the default), shows `custom_tags`, demonstrates `flush(timeout=5.0)` between requests. | | **Configuration options** | Extended with the 7 new options. `table_id` default updated to `agent_events`. | | **NEW: Auto-created analytics views** | Lists each `v_*` view and the typed columns it exposes. | | **NEW: Auto schema upgrade** | Documents the additive `ALTER TABLE ADD COLUMN` behavior gated by the `langchain_bq_schema_version` table label. | | **NEW: Sub-agent attribution** | Documents the `agent → langgraph_node → checkpoint_ns → graph_name` fallback chain. | | **Event types and payloads** | LLM_RESPONSE attributes now mention `usage`, `model_version`, `usage_metadata`, `cache_metadata`. LLM_REQUEST mentions `llm_config` + `tools`. New AGENT_* / INVOCATION_* table. Tool usage table fixed to show the actual `{tool, input/result}` JSON shape. | | **Advanced SQL examples** | Sweep stale event names. Sessionize-conversation view fixed (no more `USER_MESSAGE_RECEIVED`). Tool-name path fixed (`$.tool` not `$.tool_name` in content). | | **LangGraph integration** | Event-type table updated to `AGENT_*` / `INVOCATION_*`. Code sample uses the renamed events. | Total: **172 insertions, 53 deletions** in one file. Net 25 stale tokens swept (`GRAPH_*`, `NODE_*`, `agent_events_v2`, `USER_MESSAGE_RECEIVED`). ## Test plan - [x] Page renders as valid MDX (no broken frontmatter, code fences, or tables). - [x] All `JSON_VALUE` paths in the SQL examples match the actual JSON shape the handler emits (verified against `_build_content` in `bigquery_callback.py`). - [x] All `event_type` literals in code/SQL examples are types the handler actually emits. - [x] Zero remaining stale references (`grep -cE "GRAPH_(START|END|ERROR)|NODE_(STARTING|COMPLETED|ERROR)|agent_events_v2|USER_MESSAGE_RECEIVED"` returns 0). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:53:17 -04:00
yindo closed this issue 2026-06-05 18:53:17 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3826