Skip to content

feat: add initial span tracing to http calls#12089

Merged
ldetmer merged 6 commits intomainfrom
http-request-tracing
Mar 17, 2026
Merged

feat: add initial span tracing to http calls#12089
ldetmer merged 6 commits intomainfrom
http-request-tracing

Conversation

@ldetmer
Copy link
Contributor

@ldetmer ldetmer commented Mar 16, 2026

This PR starts the implementation of low level HTTP tracing towards go/sdk:java-bigquery-observability.

It add an HTTP inteceptor to all HTTP requests and for now adds a few basic http request attributes to existing span. While we work through development all span changes will be gated through a system property: com.google.cloud.bigquery.http.tracing.dev.enabled which is disabled by default.

There is no change to existing telemetry (since flag is off).

example trace from this PR

Example trace before
change

@ldetmer ldetmer requested review from a team as code owners March 16, 2026 18:13
@ldetmer ldetmer requested a review from blakeli0 March 16, 2026 18:21
@ldetmer ldetmer requested a review from jinseopkim0 March 16, 2026 20:09
@ldetmer ldetmer requested a review from lqiu96 March 16, 2026 20:50
@lqiu96
Copy link
Member

lqiu96 commented Mar 16, 2026

Error:

2026-03-16T21:23:17.1945793Z 21:23:17:194 [ERROR] Tests run: 52, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.176 s <<< FAILURE! -- in com.google.cloud.bigquery.JobTest
2026-03-16T21:23:17.1947952Z 21:23:17:194 [ERROR] com.google.cloud.bigquery.spi.v2.HttpBigQueryRpcTest$TelemetryEnabled.testHttpTracingEnabledAddsAdditionalAttributes -- Time elapsed: 0.015 s <<< FAILURE!
2026-03-16T21:23:17.1949706Z org.opentest4j.AssertionFailedError: expected: not <null>
2026-03-16T21:23:17.1950878Z 	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:152)
2026-03-16T21:23:17.1952202Z 	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
2026-03-16T21:23:17.1953450Z 	at org.junit.jupiter.api.AssertNotNull.failNull(AssertNotNull.java:49)
2026-03-16T21:23:17.1954444Z 	at org.junit.jupiter.api.AssertNotNull.assertNotNull(AssertNotNull.java:35)
2026-03-16T21:23:17.1955784Z 	at org.junit.jupiter.api.AssertNotNull.assertNotNull(AssertNotNull.java:30)
2026-03-16T21:23:17.1957076Z 	at org.junit.jupiter.api.Assertions.assertNotNull(Assertions.java:304)
2026-03-16T21:23:17.1958602Z 	at com.google.cloud.bigquery.spi.v2.HttpBigQueryRpcTest$TelemetryEnabled.testHttpTracingEnabledAddsAdditionalAttributes(HttpBigQueryRpcTest.java:950)
2026-03-16T21:23:17.1960179Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
2026-03-16T21:23:17.1961266Z 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
2026-03-16T21:23:17.1962301Z 	at java.base/java.util.concurrent.ForkJoinTask.awaitDone(ForkJoinTask.java:436)
2026-03-16T21:23:17.1963411Z 	at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:670)
2026-03-16T21:23:17.1964361Z 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
2026-03-16T21:23:17.1965588Z 	at java.base/java.util.concurrent.ForkJoinTask.awaitDone(ForkJoinTask.java:436)
2026-03-16T21:23:17.1966664Z 	at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:670)
2026-03-16T21:23:17.1967879Z 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
2026-03-16T21:23:17.1968811Z 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
2026-03-16T21:23:17.1969959Z 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
2026-03-16T21:23:17.1970887Z 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
2026-03-16T21:23:17.1971891Z 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

@ldetmer ldetmer merged commit db50ccd into main Mar 17, 2026
56 checks passed
@ldetmer ldetmer deleted the http-request-tracing branch March 17, 2026 17:18
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.

3 participants