ApplicationInsights-Java icon indicating copy to clipboard operation
ApplicationInsights-Java copied to clipboard

fix instrumental jdbc sybase

Open ppramos opened this issue 3 years ago • 1 comments

Fix jdbc instrumentation Recursive statements inside Connection#getMetaData

Connection#getMetaData() may execute a Statement or PreparedStatement to retrieve DB info. This happens before the DB CLIENT span is started (and put in the current context), so this instrumentation runs again and the shouldStartSpan() check always returns true - and so on until we get a StackOverflowError using CallDepth prevents this, because this check happens before Connection#getMetadata() is called - the first recursive Statement call is just skipped and we do not create a span for it

ppramos avatar Apr 29 '21 04:04 ppramos

hi @ppramos, so sorry missed this PR, could you submit this upstream to https://github.com/open-telemetry/opentelemetry-java-instrumentation instead?

trask avatar Nov 10 '21 23:11 trask

closing, IIRC this has been fixed upstream

trask avatar Aug 15 '22 21:08 trask