Generate spans for org.postgresql.copy.CopyManager

You can add them with trace_methods, but that doesn't capture the SQL query for the and context.db.statement.

Hi and thanks for your question :slight_smile:

So you basically need an option to capture parameters for the trace_methods config? We have an issue for that: Feel free to upvote that which helps us prioritizing it.

Note that this would probably not add the query to context.db.statement but rather something like context.arguments.0, for example.

Or do you propose we should have dedicated support for org.postgresql.copy.CopyManager? I'm not really familiar with that class. Out of curiosity: what do you use it for and why don't you use the regular javax.sql.Statement API?


I was proposing dedicated support, to match the other DB spans and allow you to deal with the call nesting (e.g. copyTo(*,*) calls copyTo(*,*,*) and both get a span created when using trace_methods).

That class is necessary in order to use COPY ... STDIN/STDOUT statements, because the JDBC API only supports attaching streams to individual fields, not the whole statement.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.