Java driver dont fire query-start probe in postgres 11
I presume the difference between you running your queries via psql vs. from a Java program is that you use prepared statements in Java. Processing "simple statements" and prepared statements take different code paths in the Postgres backend (postgres.c).

"query-start" probe is only called when a simple statement is executed (exec_simple_query), while a prepared statement processing has two separate distinct stages: parse (exec_parse_message) and execute (exec_execute_message).

Both code paths converge when they call PortalRun in pquery.c, where the "query-execute" probe is called. 

In other words, the two code paths look like this (omitting the "done" probes):

psql -&gt; simple statement
  query-start probe
  query-parse-start probe
  query-parse-done probe      
  query-rewrite-start probe
  query-rewrite-done probe
  query-plan-start probe
  query-plan-done probe
  query-execute-start probe
  query-execute-done probe
  query-done probe

JDBC -&gt; prepared statement
  prepare phase
    query-parse-start probe
    query-parse-done probe     
  execute phase 
    query-execute-start probe
    query-execute-done probe


If you're not particularly concerned about the query parsing and planning latency, you need to capture the "query-execute-*" probes. If you need the query text, capture also "query-parse-start".