Skip to content

Commit 9c0745a

Browse files
authored
Merge branch 'master' into dougqh/span-links-allocation
2 parents 17a0044 + c0ce9c5 commit 9c0745a

83 files changed

Lines changed: 9570 additions & 413 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,5 +188,6 @@
188188
# @DataDog/rum
189189
/internal-api/src/main/java/datadog/trace/api/rum/ @DataDog/rum
190190
/internal-api/src/test/groovy/datadog/trace/api/rum/ @DataDog/rum
191+
/dd-smoke-tests/rum/ @DataDog/rum
191192
/telemetry/src/main/java/datadog/telemetry/rum/ @DataDog/rum
192193
/telemetry/src/test/groovy/datadog/telemetry/rum/ @DataDog/rum

.github/dependabot.yml

Lines changed: 34 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
1-
# To get started with Dependabot version updates, you'll need to specify which
2-
# package ecosystems to update and where the package manifests are located.
3-
# Please see the documentation for all configuration options:
4-
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5-
61
version: 2
72
updates:
8-
- package-ecosystem: "github-actions"
9-
directory: "/"
10-
schedule:
11-
interval: "weekly"
12-
labels:
13-
- "comp: tooling"
14-
- "tag: dependencies"
15-
- "tag: no release notes"
16-
commit-message:
17-
prefix: "chore(ci): "
18-
groups:
19-
gh-actions-packages:
20-
patterns:
21-
- "*"
22-
23-
- package-ecosystem: "gradle"
24-
directory: "/"
25-
schedule:
26-
interval: "weekly"
27-
allow:
28-
- dependency-name: "gradle"
29-
ignore:
30-
- dependency-name: "gradle"
31-
update-types: ["version-update:semver-major"]
32-
labels:
33-
- "comp: tooling"
34-
- "tag: dependencies"
35-
- "tag: no release notes"
36-
commit-message:
37-
prefix: "chore(build): "
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
labels:
8+
- 'comp: tooling'
9+
- 'tag: dependencies'
10+
- 'tag: no release notes'
11+
commit-message:
12+
prefix: 'chore(ci): '
13+
groups:
14+
gh-actions-packages:
15+
patterns:
16+
- '*'
17+
cooldown:
18+
default-days: 14
19+
- package-ecosystem: gradle
20+
directory: /
21+
schedule:
22+
interval: weekly
23+
allow:
24+
- dependency-name: gradle
25+
ignore:
26+
- dependency-name: gradle
27+
update-types:
28+
- version-update:semver-major
29+
labels:
30+
- 'comp: tooling'
31+
- 'tag: dependencies'
32+
- 'tag: no release notes'
33+
commit-message:
34+
prefix: 'chore(build): '
35+
cooldown:
36+
default-days: 14

.github/workflows/create-release-branch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
run: |
120120
git config user.name "github-actions[bot]"
121121
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
122-
git commit -m "chore: Pin system-tests for release branch" .github/workflows/run-system-tests.yaml
122+
git commit -m "chore: Pin system-tests for release branch" .github/workflows/run-system-tests.yaml .gitlab-ci.yml
123123
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
124124
125125
- name: Push changes

.github/workflows/run-system-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
needs:
6363
- build
6464
# If you change the following comment, update the pattern in the update_system_test_reference.sh script to match.
65-
uses: DataDog/system-tests/.github/workflows/system-tests.yml@main # system tests are pinned for releases only
65+
uses: DataDog/system-tests/.github/workflows/system-tests.yml@main # system tests are pinned on release branches only
6666
secrets:
6767
TEST_OPTIMIZATION_API_KEY: ${{ secrets.DATADOG_API_KEY_PROD }}
6868
permissions:
@@ -72,7 +72,7 @@ jobs:
7272
with:
7373
library: java
7474
# If you change the following comment, update the pattern in the update_system_test_reference.sh script to match.
75-
ref: main # system tests are pinned for releases only
75+
ref: main # system tests are pinned on release branches only
7676
binaries_artifact: binaries
7777
desired_execution_time: 900 # 15 minutes
7878
scenarios_groups: tracer-release

.gitlab-ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,12 @@ aggregate_test_counts:
809809
rules:
810810
- if: '$POPULATE_CACHE'
811811
when: never
812-
- when: always
812+
- if: '$CI_COMMIT_BRANCH == "master"'
813+
when: on_success
814+
- if: '$CI_COMMIT_BRANCH =~ /^mq-working-branch-/'
815+
when: on_success
816+
- if: '$CI_COMMIT_BRANCH =~ /^gh-readonly-queue/'
817+
when: on_success
813818
script:
814819
- *set_datadog_api_keys
815820
- .gitlab/aggregate_test_counts.sh
@@ -1066,6 +1071,7 @@ publishing-gate:
10661071

10671072
configure_system_tests:
10681073
variables:
1074+
SYSTEM_TESTS_REF: main # system tests are pinned on release branches only
10691075
SYSTEM_TESTS_SCENARIOS_GROUPS: "simple_onboarding,simple_onboarding_profiling,simple_onboarding_appsec,docker-ssi,lib-injection"
10701076

10711077
create_key:

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/f14ac28614630d12bcfe6cba4fd8d72dce142c62ff0b053ba7c323622104ebd7/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/9cf7d7609ff62e4723c9cbc061ca2a25345ce5d6055b9acad9a13dbf736261f0/one-pipeline.yml

communication/src/main/java/datadog/communication/ddagent/SharedCommunicationObjects.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import static datadog.trace.util.AgentThreadFactory.AGENT_THREAD_GROUP;
55

66
import datadog.common.container.ContainerInfo;
7-
import datadog.common.socket.SocketUtils;
87
import datadog.communication.http.OkHttpUtils;
8+
import datadog.communication.http.SocketUtils;
99
import datadog.metrics.api.Monitoring;
1010
import datadog.remoteconfig.ConfigurationPoller;
1111
import datadog.remoteconfig.DefaultConfigurationPoller;

communication/src/main/java/datadog/communication/http/OkHttpUtils.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package datadog.communication.http;
22

3-
import static datadog.common.socket.SocketUtils.discoverApmSocket;
3+
import static datadog.communication.http.SocketUtils.discoverApmSocket;
44
import static java.util.concurrent.TimeUnit.MILLISECONDS;
55
import static java.util.concurrent.TimeUnit.SECONDS;
66

@@ -68,6 +68,7 @@ public static OkHttpClient buildHttpClient(
6868
final long timeoutMillis) {
6969
return buildHttpClient(
7070
unixDomainSocketPath,
71+
Config.get().isJdkSocketEnabled(),
7172
namedPipe,
7273
null,
7374
isHttp,
@@ -77,7 +78,8 @@ public static OkHttpClient buildHttpClient(
7778
null,
7879
null,
7980
null,
80-
timeoutMillis);
81+
timeoutMillis,
82+
Config.get().isAgentConfiguredUsingDefault());
8183
}
8284

8385
public static OkHttpClient buildHttpClient(
@@ -93,6 +95,7 @@ public static OkHttpClient buildHttpClient(
9395
final long timeoutMillis) {
9496
return buildHttpClient(
9597
discoverApmSocket(config),
98+
config.isJdkSocketEnabled(),
9699
config.getAgentNamedPipe(),
97100
dispatcher,
98101
isPlainHttp(url),
@@ -102,13 +105,15 @@ public static OkHttpClient buildHttpClient(
102105
proxyPort,
103106
proxyUsername,
104107
proxyPassword,
105-
timeoutMillis);
108+
timeoutMillis,
109+
config.isAgentConfiguredUsingDefault());
106110
}
107111

108112
public abstract static class CustomListener extends EventListener {}
109113

110114
private static OkHttpClient buildHttpClient(
111115
final String unixDomainSocketPath,
116+
final boolean useJdkUnixDomainSocket,
112117
final String namedPipe,
113118
final Dispatcher dispatcher,
114119
final boolean isHttp,
@@ -118,7 +123,8 @@ private static OkHttpClient buildHttpClient(
118123
final Integer proxyPort,
119124
final String proxyUsername,
120125
final String proxyPassword,
121-
final long timeoutMillis) {
126+
final long timeoutMillis,
127+
final boolean agentConfiguredUsingDefault) {
122128
final OkHttpClient.Builder builder = new OkHttpClient.Builder();
123129

124130
try {
@@ -144,7 +150,9 @@ private static OkHttpClient buildHttpClient(
144150
dispatcher != null ? dispatcher : new Dispatcher(RejectingExecutorService.INSTANCE));
145151

146152
if (unixDomainSocketPath != null) {
147-
builder.socketFactory(new UnixDomainSocketFactory(new File(unixDomainSocketPath)));
153+
builder.socketFactory(
154+
new UnixDomainSocketFactory(
155+
new File(unixDomainSocketPath), useJdkUnixDomainSocket, agentConfiguredUsingDefault));
148156
log.debug("Using UnixDomainSocket as http transport");
149157
} else if (namedPipe != null) {
150158
builder.socketFactory(new NamedPipeSocketFactory(namedPipe));

utils/socket-utils/src/main/java/datadog/common/socket/SocketUtils.java renamed to communication/src/main/java/datadog/communication/http/SocketUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package datadog.common.socket;
1+
package datadog.communication.http;
22

33
import static datadog.trace.api.ConfigDefaults.DEFAULT_TRACE_AGENT_SOCKET_PATH;
44

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

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,18 @@ private RequestBody makeErrorTrackingRequestBody(@Nonnull CrashLog payload, bool
571571
"os.version")); // this has been restructured under OsInfo so taking raw here
572572
writer.endObject();
573573
}
574+
// experimental
575+
if (payload.experimental != null && payload.experimental.ucontext != null) {
576+
writer.name("experimental");
577+
writer.beginObject();
578+
writer.name("ucontext");
579+
writer.beginObject();
580+
for (Map.Entry<String, String> entry : payload.experimental.ucontext.entrySet()) {
581+
writer.name(entry.getKey()).value(entry.getValue());
582+
}
583+
writer.endObject();
584+
writer.endObject();
585+
}
574586
writer.endObject();
575587
}
576588
return RequestBody.create(APPLICATION_JSON, buf.readByteString());
@@ -599,6 +611,16 @@ private String tagsForErrorTracking(String uuid, boolean isPing, boolean incompl
599611
tags.append(",")
600612
.append("language_version:")
601613
.append(normalizeTagValue(SystemProperties.getOrDefault("java.version", "unknown")));
614+
tags.append(",")
615+
.append("runtime_version:")
616+
.append(
617+
normalizeTagValue(SystemProperties.getOrDefault("java.runtime.version", "unknown")));
618+
tags.append(",")
619+
.append("runtime_vendor:")
620+
.append(normalizeTagValue(SystemProperties.getOrDefault("java.vendor", "unknown")));
621+
tags.append(",")
622+
.append("runtime_name:")
623+
.append(normalizeTagValue(SystemProperties.getOrDefault("java.runtime.name", "unknown")));
602624
tags.append(",").append("tracer_version:").append(normalizeTagValue(VersionInfo.VERSION));
603625
tags.append(",").append("uuid:").append(uuid);
604626
return (tags.toString());
@@ -611,6 +633,16 @@ private String tagsForPing(String uuid) {
611633
tags.append(",")
612634
.append("language_version:")
613635
.append(normalizeTagValue(SystemProperties.getOrDefault("java.version", "unknown")));
636+
tags.append(",")
637+
.append("runtime_version:")
638+
.append(
639+
normalizeTagValue(SystemProperties.getOrDefault("java.runtime.version", "unknown")));
640+
tags.append(",")
641+
.append("runtime_vendor:")
642+
.append(normalizeTagValue(SystemProperties.getOrDefault("java.vendor", "unknown")));
643+
tags.append(",")
644+
.append("runtime_name:")
645+
.append(normalizeTagValue(SystemProperties.getOrDefault("java.runtime.name", "unknown")));
614646
tags.append(",").append("tracer_version:").append(normalizeTagValue(VersionInfo.VERSION));
615647
tags.append(",").append("uuid:").append(uuid);
616648
return (tags.toString());

0 commit comments

Comments
 (0)