Skip to content

Commit 854633b

Browse files
authored
Merge branch 'master' into dougqh/tagmap-cleanup
2 parents 8026a5f + f2a8d05 commit 854633b

File tree

74 files changed

+109
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+109
-373
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
issuer: https://token.actions.githubusercontent.com
2+
3+
subject_pattern: ^repo:DataDog/dd-trace-java:ref:refs/heads/.+$
4+
5+
claim_pattern:
6+
event_name: (push|workflow_dispatch)
7+
ref: refs/heads/.+
8+
job_workflow_ref: DataDog/dd-trace-java/\.github/workflows/pin-system-tests\.yaml@refs/heads/.+
9+
10+
permissions:
11+
contents: write
12+
pull_requests: write

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/DatabaseClientDecorator.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,7 @@ public void onRawStatement(AgentSpan span, String sql) {
137137
BlockResponseFunction brf = ctx.getBlockResponseFunction();
138138
if (brf != null) {
139139
Flow.Action.RequestBlockingAction rba = (Flow.Action.RequestBlockingAction) action;
140-
brf.tryCommitBlockingResponse(
141-
ctx.getTraceSegment(),
142-
rba.getStatusCode(),
143-
rba.getBlockingContentType(),
144-
rba.getExtraHeaders());
140+
brf.tryCommitBlockingResponse(ctx.getTraceSegment(), rba);
145141
}
146142
throw new BlockingException("Blocked request (for SQL query)");
147143
}

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpClientDecorator.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,7 @@ protected void onHttpClientRequest(final AgentSpan span, final String url) {
210210
BlockResponseFunction brf = ctx.getBlockResponseFunction();
211211
if (brf != null) {
212212
Flow.Action.RequestBlockingAction rba = (Flow.Action.RequestBlockingAction) action;
213-
brf.tryCommitBlockingResponse(
214-
ctx.getTraceSegment(),
215-
rba.getStatusCode(),
216-
rba.getBlockingContentType(),
217-
rba.getExtraHeaders());
213+
brf.tryCommitBlockingResponse(ctx.getTraceSegment(), rba);
218214
}
219215
throw new BlockingException("Blocked request (for SSRF attempt)");
220216
}

dd-java-agent/agent-crashtracking/src/main/java/datadog/crashtracking/CrashUploader.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ public CrashUploader(@Nonnull final ConfigManager.StoredConfig storedConfig) {
180180

181181
public void notifyCrashStarted(String error) {
182182
sendPingToTelemetry(error);
183-
sendPingToErrorTracking(error);
183+
if (storedConfig.sendToErrorTracking) {
184+
sendPingToErrorTracking(error);
185+
}
184186
}
185187

186188
// @VisibleForTesting

dd-java-agent/instrumentation/akka/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/BlockingResponseHelper.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@ public static HttpResponse handleFinishForWaf(final AgentSpan span, final HttpRe
4242
if (action instanceof Flow.Action.RequestBlockingAction) {
4343
Flow.Action.RequestBlockingAction rba = (Flow.Action.RequestBlockingAction) action;
4444
if (brf instanceof AkkaBlockResponseFunction) {
45-
brf.tryCommitBlockingResponse(
46-
requestContext.getTraceSegment(),
47-
rba.getStatusCode(),
48-
rba.getBlockingContentType(),
49-
rba.getExtraHeaders());
45+
brf.tryCommitBlockingResponse(requestContext.getTraceSegment(), rba);
5046
HttpResponse altResponse =
5147
((AkkaBlockResponseFunction) brf).maybeCreateAlternativeResponse();
5248
if (altResponse != null) {

dd-java-agent/instrumentation/akka/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/UnmarshallerHelpers.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,7 @@ private static void executeCallback(
128128
BlockResponseFunction blockResponseFunction = reqCtx.getBlockResponseFunction();
129129
if (blockResponseFunction != null) {
130130
boolean success =
131-
blockResponseFunction.tryCommitBlockingResponse(
132-
reqCtx.getTraceSegment(),
133-
rba.getStatusCode(),
134-
rba.getBlockingContentType(),
135-
rba.getExtraHeaders());
131+
blockResponseFunction.tryCommitBlockingResponse(reqCtx.getTraceSegment(), rba);
136132
if (success) {
137133
if (blockResponseFunction instanceof AkkaBlockResponseFunction) {
138134
AkkaBlockResponseFunction abrf = (AkkaBlockResponseFunction) blockResponseFunction;

dd-java-agent/instrumentation/grizzly/grizzly-http-2.3.20/src/main/java/datadog/trace/instrumentation/grizzlyhttp232/ParsedBodyParametersInstrumentation.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,7 @@ static void after(
111111
Flow.Action.RequestBlockingAction rba = (Flow.Action.RequestBlockingAction) action;
112112
BlockResponseFunction blockResponseFunction = reqCtx.getBlockResponseFunction();
113113
if (blockResponseFunction != null) {
114-
blockResponseFunction.tryCommitBlockingResponse(
115-
reqCtx.getTraceSegment(),
116-
rba.getStatusCode(),
117-
rba.getBlockingContentType(),
118-
rba.getExtraHeaders());
114+
blockResponseFunction.tryCommitBlockingResponse(reqCtx.getTraceSegment(), rba);
119115
if (t == null) {
120116
t = new BlockingException("Blocked request (for Parameters/processParameters)");
121117
}

dd-java-agent/instrumentation/java/java-io-1.8/src/main/java/datadog/trace/instrumentation/java/lang/FileLoadedRaspHelper.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,7 @@ public void beforeFileLoaded(@Nonnull final String path) {
122122
BlockResponseFunction brf = ctx.getBlockResponseFunction();
123123
if (brf != null) {
124124
Flow.Action.RequestBlockingAction rba = (Flow.Action.RequestBlockingAction) action;
125-
brf.tryCommitBlockingResponse(
126-
ctx.getTraceSegment(),
127-
rba.getStatusCode(),
128-
rba.getBlockingContentType(),
129-
rba.getExtraHeaders());
125+
brf.tryCommitBlockingResponse(ctx.getTraceSegment(), rba);
130126
}
131127
throw new BlockingException("Blocked request (for LFI attempt)");
132128
}

dd-java-agent/instrumentation/java/java-net/java-net-1.8/src/main/java/datadog/trace/instrumentation/java/net/URLSinkCallSite.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,7 @@ private static void raspCallback(@Nonnull final URL url) {
8585
BlockResponseFunction brf = ctx.getBlockResponseFunction();
8686
if (brf != null) {
8787
Flow.Action.RequestBlockingAction rba = (Flow.Action.RequestBlockingAction) action;
88-
brf.tryCommitBlockingResponse(
89-
ctx.getTraceSegment(),
90-
rba.getStatusCode(),
91-
rba.getBlockingContentType(),
92-
rba.getExtraHeaders());
88+
brf.tryCommitBlockingResponse(ctx.getTraceSegment(), rba);
9389
}
9490
throw new BlockingException("Blocked request (for SSRF attempt)");
9591
}

dd-java-agent/instrumentation/jersey/jersey-appsec/jersey-appsec-2.0/src/main/java/datadog/trace/instrumentation/jersey2/MessageBodyReaderInstrumentation.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ static void after(
8686
Flow.Action.RequestBlockingAction rba = (Flow.Action.RequestBlockingAction) action;
8787
BlockResponseFunction blockResponseFunction = reqCtx.getBlockResponseFunction();
8888
if (blockResponseFunction != null) {
89-
blockResponseFunction.tryCommitBlockingResponse(
90-
reqCtx.getTraceSegment(),
91-
rba.getStatusCode(),
92-
rba.getBlockingContentType(),
93-
rba.getExtraHeaders());
89+
blockResponseFunction.tryCommitBlockingResponse(reqCtx.getTraceSegment(), rba);
9490
t = new BlockingException("Blocked request (for ReaderInterceptorExecutor/proceed)");
9591
reqCtx.getTraceSegment().effectivelyBlocked();
9692
}

0 commit comments

Comments
 (0)