Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
7bff59f
Full mode APM/DBM for SQL Server
nenadnoveljic Jun 13, 2024
27f8857
Full mode APM/DBM for SQL Server
nenadnoveljic Jun 13, 2024
b2698c8
Add support for prepared queries
nenadnoveljic Jun 14, 2024
5540a39
githooks
nenadnoveljic Jun 26, 2024
33fde67
instrumented the concrete class
nenadnoveljic Jun 28, 2024
d1cb730
if
nenadnoveljic Jun 29, 2024
d283d0a
trigger only for oracle
nenadnoveljic Jul 1, 2024
fce6234
reformat context_info
nenadnoveljic Jul 1, 2024
bb29e39
reformat contect_info
nenadnoveljic Jul 1, 2024
e200b53
instrument the instrumentation
nenadnoveljic Jul 1, 2024
cf4e7b2
sleep in context_info
nenadnoveljic Jul 1, 2024
df4fc90
adjust span start time
nenadnoveljic Jul 1, 2024
20fb17f
bug fix for time manipulation
nenadnoveljic Jul 2, 2024
c4aa15e
no nested spans
nenadnoveljic Jul 2, 2024
1953540
instrumented span as sqlserver
nenadnoveljic Jul 2, 2024
98d4bfa
prevent injecting trace parent in service mode
nenadnoveljic Jul 2, 2024
33dc8b0
concurrent durations
nenadnoveljic Jul 3, 2024
b7b2ba7
return from prepared statement
nenadnoveljic Jul 3, 2024
55d621b
inject main span
nenadnoveljic Jul 3, 2024
e040d58
invert the spans
nenadnoveljic Jul 3, 2024
c4ae679
cleanup
vandonr Jul 4, 2024
81e0c1a
factorize set context code
vandonr Jul 4, 2024
baa05a9
remove todo and commented code
vandonr Jul 4, 2024
5d816f8
also generate scope for null spans
nenadnoveljic Jul 4, 2024
9a9ec00
fix test full mode supported
nenadnoveljic Jul 5, 2024
32d383b
overlapping spans for prepared statements
nenadnoveljic Jul 5, 2024
129af61
precreated span_id (sibling spans)
nenadnoveljic Jul 9, 2024
f459700
reformat
nenadnoveljic Jul 9, 2024
79551b3
factorize isSqlServer
nenadnoveljic Jul 9, 2024
20c90db
updated setContextInfo doc
nenadnoveljic Jul 9, 2024
98d657c
localize spanID
nenadnoveljic Jul 9, 2024
88b7221
format
nenadnoveljic Jul 9, 2024
694fe60
tag instrumentation
nenadnoveljic Jul 9, 2024
b170a00
removing underscore before dd.instrumentation tag
nenadnoveljic Jul 10, 2024
d9a1fed
format
nenadnoveljic Jul 10, 2024
6bdb1cf
fixed prepared statement test
nenadnoveljic Jul 10, 2024
fbe2b8a
format
nenadnoveljic Jul 10, 2024
40386f7
empty commit
nenadnoveljic Jul 10, 2024
7c0e3d1
Test classes
nenadnoveljic Jul 13, 2024
0d57bc1
added sqlserver test
nenadnoveljic Jul 14, 2024
10d5fd6
added sqlserver container
nenadnoveljic Jul 14, 2024
6b01b4d
removed SQL Server test file
nenadnoveljic Jul 14, 2024
69715da
refactoring: use constants
nenadnoveljic Jul 14, 2024
0b19e31
added test cases
nenadnoveljic Jul 15, 2024
c69b2a2
fix formatting
nenadnoveljic Jul 15, 2024
4a0c3b9
Added test cases
nenadnoveljic Jul 15, 2024
6706a0d
boolean instrumentation tag
nenadnoveljic Jul 16, 2024
6bd51da
added instrumentation span
nenadnoveljic Jul 16, 2024
ed1b0d4
fixed tests
nenadnoveljic Jul 16, 2024
31ae1cf
normalized db type
nenadnoveljic Jul 17, 2024
933e813
Update dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace…
nenadnoveljic Jul 19, 2024
ce8069a
Update dd-java-agent/instrumentation/jdbc/src/main/java/datadog/trace…
nenadnoveljic Jul 19, 2024
bffed95
activate span on return
nenadnoveljic Jul 19, 2024
414f924
statement.close in finally
nenadnoveljic Jul 24, 2024
7b47f62
prepared instrumentation statement
nenadnoveljic Jul 24, 2024
d580d01
prepare call with literal value
nenadnoveljic Jul 26, 2024
c253b32
prepared statements
nenadnoveljic Aug 6, 2024
ba74ddf
delete commented lines
nenadnoveljic Aug 6, 2024
70721bc
without DatatypeConverter
nenadnoveljic Aug 6, 2024
7c8a954
version as constant
nenadnoveljic Aug 7, 2024
fcb763c
context_info as bytes array
nenadnoveljic Aug 7, 2024
b5217d1
eliminate string conversions completely
nenadnoveljic Aug 7, 2024
5de92f3
use bytebuffer
nenadnoveljic Aug 8, 2024
c3e9fa9
improved exception handling
nenadnoveljic Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.sql.Statement;
import java.util.HashSet;
import java.util.Set;
import javax.xml.bind.DatatypeConverter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -267,16 +268,18 @@ public long setContextInfo(Connection connection, DBInfo dbInfo) {
try (AgentScope scope = activateSpan(instrumentationSpan)) {
String samplingDecision = instrumentationSpan.forceSamplingDecision() > 0 ? "1" : "0";
String contextInfo =
"0x"
"0"
Comment thread
nenadnoveljic marked this conversation as resolved.
Outdated
+ samplingDecision
+ DDSpanId.toHexStringPadded(spanID)
+ instrumentationSpan.getTraceId().toHexString();

String instrumentationSql = "set context_info " + contextInfo;
String instrumentationSql = "set context_info ?";
instrumentationStatement = connection.prepareStatement(instrumentationSql);
instrumentationStatement.setBytes(1, DatatypeConverter.parseHexBinary(contextInfo));
Comment thread
nenadnoveljic marked this conversation as resolved.
Outdated
// instrumentationStatement.setBytes(1, contextInfo.getBytes());
DECORATE.onStatement(instrumentationSpan, instrumentationSql);
instrumentationStatement.execute();
} catch (SQLException e) {
} catch (Exception e) {
log.debug(
"Failed to set extra DBM data in context info for trace {}. "
+ "To disable this behavior, set DBM_PROPAGATION_MODE to 'service' mode. "
Expand Down