Skip to content

Commit 09ae5cc

Browse files
committed
merge master
2 parents 24790e4 + 104a441 commit 09ae5cc

File tree

572 files changed

+4581
-2919
lines changed

Some content is hidden

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

572 files changed

+4581
-2919
lines changed

.circleci/config.continue.yml.j2

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -971,19 +971,20 @@ jobs:
971971
cd system-tests
972972
set +e
973973
RUN_ATTEMPTS=1
974-
while [ $RUN_ATTEMPTS -le 3 ]; do
974+
MAX_ATTEMPTS=1 # Disable retries as the runner is supposed to be stable. Revert to 3 if needed.
975+
while [ $RUN_ATTEMPTS -le $MAX_ATTEMPTS ]; do
975976
echo "Running parametric test attempt $RUN_ATTEMPTS"
976-
timeout 20m ./run.sh PARAMETRIC -L java --log-cli-level=DEBUG --durations=30 -vv
977+
timeout 20m ./run.sh PARAMETRIC --library java --durations=30 -vv
977978
status=$?
978-
#timneout returns 124 if it times out
979-
#if the return code is not 124, then we exit with the status
979+
# timeout returns 124 if it times out
980+
# if the return code is not 124, then we exit with the status
980981
if [ $status -ne 124 ]; then
981982
exit $status
982983
break
983984
fi
984985
RUN_ATTEMPTS=$((RUN_ATTEMPTS+1))
985-
if [ $RUN_ATTEMPTS -eq 4 ]; then
986-
#Max attempts reached, exit with 124
986+
if [ $RUN_ATTEMPTS -gt $MAX_ATTEMPTS ]; then
987+
# Max attempts reached, exit with 124
987988
exit 124
988989
fi
989990
done
@@ -994,9 +995,11 @@ jobs:
994995
- run:
995996
name: Collect artifacts
996997
command: tar -cvzf logs_java_parametric_dev.tar.gz -C system-tests logs_parametric
998+
when: always
997999
9981000
- store_artifacts:
9991001
path: logs_java_parametric_dev.tar.gz
1002+
when: always
10001003
10011004
10021005
build_test_jobs: &build_test_jobs

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Bug Report
4+
url: https://help.datadoghq.com/hc/en-us/requests/new?tf_1260824651490=pt_product_type:apm&tf_1900004146284=pt_apm_language:java
5+
about: This option creates an expedited Bug Report via the helpdesk (no login required). This will allow us to look up your account and allows you to provide additional information in private.
6+
- name: Feature Request
7+
url: https://help.datadoghq.com/hc/en-us/requests/new?tf_1260824651490=pt_product_type:apm&tf_1900004146284=pt_apm_language:java&tf_1260825272270=pt_apm_category_feature_request
8+
about: This option creates an expedited Feature Request via the helpdesk (no login required). This helps with prioritization and allows you to provide additional information in private.

.github/workflows/analyze-changes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ jobs:
132132
ls -laR "./workspace/.trivy"
133133
134134
- name: Run Trivy security scanner
135-
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # v0.24.0
135+
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
136136
with:
137137
scan-type: rootfs
138138
scan-ref: './workspace/.trivy/'

.github/workflows/update-gradle-dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@ jobs:
7777
--base master \
7878
--head $BRANCH_NAME \
7979
--label "tag: dependencies" \
80-
--label "tag: no release notes"
80+
--label "tag: no release notes" \
8181
--body-file -

.gitlab-ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,8 @@ package-oci:
216216
onboarding_tests_installer:
217217
parallel:
218218
matrix:
219-
- ONBOARDING_FILTER_WEBLOG: [test-app-java, test-app-java-container, test-app-java-container-jdk15, test-app-java-alpine]
219+
- ONBOARDING_FILTER_WEBLOG: [test-app-java, test-app-java-container, test-app-java-alpine]
220220
SCENARIO: [ SIMPLE_INSTALLER_AUTO_INJECTION, SIMPLE_AUTO_INJECTION_PROFILING ]
221-
- ONBOARDING_FILTER_WEBLOG: [test-app-java-buildpack]
222-
SCENARIO: [ SIMPLE_INSTALLER_AUTO_INJECTION ]
223221

224222
onboarding_tests_k8s_injection:
225223
variables:

LICENSE-3rdparty.csv

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
Component ,Origin ,License ,Copyright
2-
various ,io.opentelemetry ,Apache-2.0 ,Copyright The OpenTracing Authors
3-
various ,io.opentracing ,Apache-2.0 ,Copyright The OpenTracing Authors
4-
import ,org.objectweb.asm ,BSD 3-Clause,"Copyright (c) 2000-2011 INRIA, France Telecom"
5-
import ,com.googlecode.concurrentlinkedhashmap,Apache-2.0 ,Copyright 2010 Google Inc.
6-
import ,com.github.benmanes ,Apache-2.0 ,Copyright 2014 Ben Manes
7-
import ,net.bytebuddy ,Apache-2.0 ,Copyright 2014 - Present Rafael Winterhalter
8-
import ,com.blogspot.mydailyjava.weaklockfree ,Apache-2.0 ,
9-
import ,org.jctools ,Apache-2.0 ,
10-
import ,jnr ,Apache-2.0 ,
11-
import ,com.kenai.constantine ,Apache-2.0 ,
12-
import ,com.google.auto.service ,Apache-2.0 ,Copyright 2013 Google Inc.
13-
import ,okhttp3 ,Apache-2.0 ,"Copyright (C) 2014 Square, Inc."
14-
import ,okio ,Apache-2.0 ,"Copyright (C) 2014 Square, Inc."
15-
import ,com.timgroup.statsd ,Apache-2.0 ,"Copyright (C) 2014 youDevise, Ltd."
16-
import ,com.squareup ,Apache-2.0 ,"Copyright (C) 2014 Square, Inc."
17-
import ,org.slf4j ,MIT ,Copyright (c) 2004-2017 QOS.ch
18-
import ,org.openjdk.jmc ,UPL-1.0 ,"Copyright (c) 2018 Oracle America, Inc"
19-
import ,net.jpountz ,Apache-2.0 ,
20-
import ,com.fasterxml.jackson ,Apache-2.0 ,
21-
import ,org.yaml.snakeyaml ,Apache-2.0 ,
22-
import ,com.beust.jcommander ,Apache-2.0 ,
23-
import ,org.owasp.encoder ,BSD 3-Clause,Copyright (c) 2012 Jeff Ichnowski
24-
https://github.com/DataDog/dd-trace-java/blob/master/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/ci/git/RawParseUtils.java ,JGit ,EDL-1.0 ,
25-
https://github.com/DataDog/dd-trace-java/blob/master/internal-api/src/main/java/datadog/trace/bootstrap/instrumentation/ci/git/LocalFSGitInfoExtractor.java,JGit ,EDL-1.0 ,
26-
https://github.com/DataDog/dd-trace-java/blob/master/internal-api/src/main/java/datadog/trace/api/http/AntPathMatcher.java ,https://github.com/apache/shiro ,Apache-2.0 ,Copyright 2008-2020 The Apache Software Foundation
1+
Component ,Origin ,License ,Copyright
2+
various ,io.opentelemetry ,Apache-2.0 ,Copyright The OpenTracing Authors
3+
various ,io.opentracing ,Apache-2.0 ,Copyright The OpenTracing Authors
4+
import ,org.objectweb.asm ,BSD 3-Clause,"Copyright (c) 2000-2011 INRIA, France Telecom"
5+
import ,com.googlecode.concurrentlinkedhashmap ,Apache-2.0 ,Copyright 2010 Google Inc.
6+
import ,com.github.benmanes ,Apache-2.0 ,Copyright 2014 Ben Manes
7+
import ,net.bytebuddy ,Apache-2.0 ,Copyright 2014 - Present Rafael Winterhalter
8+
import ,com.blogspot.mydailyjava.weaklockfree ,Apache-2.0 ,
9+
import ,org.jctools ,Apache-2.0 ,
10+
import ,jnr ,Apache-2.0 ,
11+
import ,com.kenai.constantine ,Apache-2.0 ,
12+
import ,com.google.auto.service ,Apache-2.0 ,Copyright 2013 Google Inc.
13+
import ,okhttp3 ,Apache-2.0 ,"Copyright (C) 2014 Square, Inc."
14+
import ,okio ,Apache-2.0 ,"Copyright (C) 2014 Square, Inc."
15+
import ,com.timgroup.statsd ,Apache-2.0 ,"Copyright (C) 2014 youDevise, Ltd."
16+
import ,com.squareup ,Apache-2.0 ,"Copyright (C) 2014 Square, Inc."
17+
import ,org.slf4j ,MIT ,Copyright (c) 2004-2017 QOS.ch
18+
import ,org.openjdk.jmc ,UPL-1.0 ,"Copyright (c) 2018 Oracle America, Inc"
19+
import ,net.jpountz ,Apache-2.0 ,
20+
import ,com.fasterxml.jackson ,Apache-2.0 ,
21+
import ,org.yaml.snakeyaml ,Apache-2.0 ,
22+
import ,com.beust.jcommander ,Apache-2.0 ,
23+
import ,org.owasp.encoder ,BSD 3-Clause,Copyright (c) 2012 Jeff Ichnowski
24+
https://github.com/DataDog/dd-trace-java/blob/master/internal-api/src/main/java/datadog/trace/api/git/RawParseUtils.java ,JGit ,EDL-1.0 ,
25+
https://github.com/DataDog/dd-trace-java/blob/master/dd-java-agent/agent-ci-visibility/src/main/java/datadog/trace/civisibility/git/LocalFSGitInfoExtractor.java,JGit ,EDL-1.0 ,
26+
https://github.com/DataDog/dd-trace-java/blob/master/internal-api/src/main/java/datadog/trace/api/normalize/AntPathMatcher.java ,https://github.com/apache/shiro ,Apache-2.0 ,Copyright 2008-2020 The Apache Software Foundation

communication/gradle.lockfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ org.apache.httpcomponents.core5:httpcore5-h2:5.1.3=spotbugs
7373
org.apache.httpcomponents.core5:httpcore5:5.1.3=spotbugs
7474
org.apache.logging.log4j:log4j-api:2.19.0=spotbugs
7575
org.apache.logging.log4j:log4j-core:2.19.0=spotbugs
76-
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath,testRuntimeClasspath
76+
org.apiguardian:apiguardian-api:1.1.2=testCompileClasspath
7777
org.checkerframework:checker-compat-qual:2.5.5=testCompileClasspath,testRuntimeClasspath
7878
org.checkerframework:checker-qual:3.13.0=testCompileClasspath,testRuntimeClasspath
7979
org.codehaus.groovy:groovy-all:3.0.17=testCompileClasspath,testRuntimeClasspath

communication/src/main/java/datadog/communication/serialization/Codec.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
package datadog.communication.serialization;
22

3+
import datadog.communication.serialization.custom.stacktrace.StackTraceEventFrameWriter;
4+
import datadog.communication.serialization.custom.stacktrace.StackTraceEventWriter;
5+
import datadog.trace.util.stacktrace.StackTraceEvent;
6+
import datadog.trace.util.stacktrace.StackTraceFrame;
37
import java.nio.ByteBuffer;
48
import java.nio.CharBuffer;
59
import java.util.Collection;
610
import java.util.Collections;
711
import java.util.Map;
12+
import java.util.stream.Collectors;
13+
import java.util.stream.Stream;
814

915
public final class Codec extends ClassValue<ValueWriter<?>> {
1016

11-
public static final Codec INSTANCE = new Codec();
17+
private static final Map<Class<?>, ValueWriter<?>> defaultConfig =
18+
Stream.of(
19+
new Object[][] {
20+
{StackTraceEvent.class, new StackTraceEventWriter()},
21+
{StackTraceFrame.class, new StackTraceEventFrameWriter()},
22+
})
23+
.collect(Collectors.toMap(data -> (Class<?>) data[0], data -> (ValueWriter<?>) data[1]));
24+
25+
public static final Codec INSTANCE = new Codec(defaultConfig);
1226

1327
private final Map<Class<?>, ValueWriter<?>> config;
1428

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
package datadog.communication.serialization.custom.stacktrace;
2+
3+
import datadog.communication.serialization.EncodingCache;
4+
import datadog.communication.serialization.ValueWriter;
5+
import datadog.communication.serialization.Writable;
6+
import datadog.trace.util.Strings;
7+
import datadog.trace.util.stacktrace.StackTraceFrame;
8+
9+
public class StackTraceEventFrameWriter implements ValueWriter<StackTraceFrame> {
10+
11+
@Override
12+
public void write(StackTraceFrame value, Writable writable, EncodingCache encodingCache) {
13+
int mapSize = 1; // id always present
14+
boolean hasText = Strings.isNotBlank(value.getText());
15+
boolean hasFile = Strings.isNotBlank(value.getFile());
16+
boolean hasLine = value.getLine() != null;
17+
boolean hasClass = Strings.isNotBlank(value.getClass_name());
18+
boolean hasFunction = Strings.isNotBlank(value.getFunction());
19+
if (hasText) {
20+
mapSize++;
21+
}
22+
if (hasFile) {
23+
mapSize++;
24+
}
25+
if (hasLine) {
26+
mapSize++;
27+
}
28+
if (hasClass) {
29+
mapSize++;
30+
}
31+
if (hasFunction) {
32+
mapSize++;
33+
}
34+
writable.startMap(mapSize);
35+
writable.writeString("id", encodingCache);
36+
writable.writeInt(value.getId());
37+
if (hasText) {
38+
writable.writeString("text", encodingCache);
39+
writable.writeString(value.getText(), encodingCache);
40+
}
41+
if (hasFile) {
42+
writable.writeString("file", encodingCache);
43+
writable.writeString(value.getFile(), encodingCache);
44+
}
45+
if (hasLine) {
46+
writable.writeString("line", encodingCache);
47+
writable.writeInt(value.getLine());
48+
}
49+
if (hasClass) {
50+
writable.writeString("class_name", encodingCache);
51+
writable.writeString(value.getClass_name(), encodingCache);
52+
}
53+
if (hasFunction) {
54+
writable.writeString("function", encodingCache);
55+
writable.writeString(value.getFunction(), encodingCache);
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)