Skip to content

feat(go/adbc/driver/flightsql): promote safe call headers into FlightSQL spans#4570

Open
binarycat-dremio wants to merge 1 commit into
apache:mainfrom
binarycat-dremio:feat/call-header-tracing-span-attrs
Open

feat(go/adbc/driver/flightsql): promote safe call headers into FlightSQL spans#4570
binarycat-dremio wants to merge 1 commit into
apache:mainfrom
binarycat-dremio:feat/call-header-tracing-span-attrs

Conversation

@binarycat-dremio

@binarycat-dremio binarycat-dremio commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Promotes allowlisted adbc.flight.sql.rpc.call_header.* metadata into FlightSQL OpenTelemetry span attributes.

This adds tracing support for safe correlation headers on:

  • FlightSQLDatabase.Open
  • FlightSQLStatement.Prepare
  • FlightSQLStatement.ExecuteQuery
  • FlightSQLStatement.ExecuteUpdate

Headers are exposed as attributes like rpc.call_header.x-request-id.

Usage examples

Safe rpc.call_header.* values may be configured at connection level:

with dbapi.connect(
    driver=str(driver),
    entrypoint="FlightSqlDriverInit",
    uri=config.ADBC_URI,
    db_kwargs={
        "adbc.flight.sql.rpc.call_header.x-request-id": "deadbeef-dead-beef-dead-beefdeadbeef",
    },
) as conn:
    ...

or at statement/cursor level:

with conn.cursor(adbc_stmt_kwargs={
    "adbc.flight.sql.rpc.call_header.x-request-id": "req-1",
}) as cur:
    cur.execute("SELECT 1")
cur.adbc_statement.set_options(**{
    "adbc.flight.sql.rpc.call_header.x-request-id": "req-2",
})
cur.execute("SELECT 1")

Why

FlightSQL already sends caller-supplied rpc.call_header.* values on outbound RPCs, but those values were not visible in tracing spans. Surfacing allowlisted correlation headers makes it easier to connect ADBC client spans with upstream request IDs and external traces.

Related

Closes #4568.

@binarycat-dremio binarycat-dremio changed the title feat: promote safe call headers into FlightSQL spans feat(go/adbc/driver/flightsql): promote safe call headers into FlightSQL spans Jul 22, 2026
@binarycat-dremio
binarycat-dremio marked this pull request as ready for review July 22, 2026 11:02
@binarycat-dremio

Copy link
Copy Markdown
Contributor Author

cc: @lidavidm you could be interested

@binarycat-dremio
binarycat-dremio force-pushed the feat/call-header-tracing-span-attrs branch from e3f028d to 03bf5b8 Compare July 23, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Promote safe rpc.call_header.* headers into FlightSQL span attributes

1 participant