[DISCUSS] FlightSQL tracing: expected relationship between Open, statement/query spans, and connection-level correlation #4572
Replies: 3 comments
I don't know about grouping them all under the same span/trace, but if we don't group them under the same span/trace then we should at least connect with them with some sort of ID metadata.
I think it might make sense for everything under a given statement being one logical trace, most definitely.
My personal preference would be a stable connection_id attribute on the statement/cursor spans rather than parent-child trace linkage since it's common that a connection might be used for multiple queries/statements. |
It appears OpenTelemetry has only specified what to do for individual calls to the database.
By the above spec, yes. I think we should align with the official spec wherever possible.
It's not clear to me that this is expected of clients in the first place. |
|
Thanks for sharing your opinion. Given the current discussion and the OTel DB span conventions, I think it may make sense to introduce a dedicated span attribute for connection-level correlation, for example The intent would not be to force all operations from a single connection into one trace, but to provide an explicit correlation key for users who want to group/query spans originating from the same logical connection. That seems consistent with the query-oriented tracing model: individual statements/operations remain separate spans/traces, while users who need stronger correlation can opt into it via span attributes rather than implicit parent-child linkage. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello colleagues,
I'd like to clarify the intended tracing model for ADBC FlightSQL.
In a typical DB-API flow like:
there seem to be a few possible interpretations of how tracing should behave, and I'm not sure which one is the expected design.
Questions:
FlightSQLDatabase.Openspan/trace?execute(...)operation start its own logical trace?connection_idattribute on statement/cursor spans rather than parent-child trace linkage?From an observability perspective, I can see two reasonable models:
Openis the parent context, and laterPrepare/ExecuteQueryspans for that connection are grouped beneath it.connection_id.I'm mainly trying to understand the intended behavior before proposing any broader change.
Related:
cc: @lidavidm @xborder @zeroshade @Mandukhai-Alimaa @amoeba
The current state with splitted traces.
The possible implementation with grouped query spans under Open entry.
All reactions