ApplicationInsights-Java
ApplicationInsights-Java copied to clipboard
fix instrumental jdbc sybase
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
hi @ppramos, so sorry missed this PR, could you submit this upstream to https://github.com/open-telemetry/opentelemetry-java-instrumentation instead?
closing, IIRC this has been fixed upstream