@@ -89478,7 +89478,7 @@ var cache = __nccwpck_require__(7389);
89478
89478
var external_child_process_ = __nccwpck_require__(5317);
89479
89479
// EXTERNAL MODULE: external "path"
89480
89480
var external_path_ = __nccwpck_require__(6928);
89481
- ;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+5084fa8e3263a_a2ac939c447d828e4767290fb0939d82 /node_modules/detsys-ts/dist/index.js
89481
+ ;// CONCATENATED MODULE: ./node_modules/.pnpm/detsys-ts@https+++codeload.github.com+DeterminateSystems+detsys-ts+tar.gz+0095c476e55f6_afe2535b95cf72dc75f2dc7dcdd6a059 /node_modules/detsys-ts/dist/index.js
89482
89482
var __defProp = Object.defineProperty;
89483
89483
var __export = (target, all) => {
89484
89484
for (var name in all)
@@ -89864,25 +89864,40 @@ async function collectBacktracesSystemd(prefixes, programNameDenyList, startTime
89864
89864
89865
89865
89866
89866
var OPTIONAL_VARIABLES = ["INVOCATION_ID"];
89867
- function identify(projectName) {
89867
+ function identify() {
89868
+ const repository = hashEnvironmentVariables("GHR", [
89869
+ "GITHUB_SERVER_URL",
89870
+ "GITHUB_REPOSITORY_OWNER",
89871
+ "GITHUB_REPOSITORY_OWNER_ID",
89872
+ "GITHUB_REPOSITORY",
89873
+ "GITHUB_REPOSITORY_ID"
89874
+ ]);
89875
+ const run_differentiator = hashEnvironmentVariables("GHWJA", [
89876
+ "GITHUB_SERVER_URL",
89877
+ "GITHUB_REPOSITORY_OWNER",
89878
+ "GITHUB_REPOSITORY_OWNER_ID",
89879
+ "GITHUB_REPOSITORY",
89880
+ "GITHUB_REPOSITORY_ID",
89881
+ "GITHUB_WORKFLOW",
89882
+ "GITHUB_JOB",
89883
+ "GITHUB_RUN_ID",
89884
+ "GITHUB_RUN_NUMBER",
89885
+ "GITHUB_RUN_ATTEMPT",
89886
+ "INVOCATION_ID"
89887
+ ]);
89868
89888
const ident = {
89889
+ $anon_distinct_id: process.env["RUNNER_TRACKING_ID"] || (0,external_crypto_.randomUUID)(),
89869
89890
correlation_source: "github-actions",
89870
- repository: hashEnvironmentVariables("GHR", [
89871
- "GITHUB_SERVER_URL",
89872
- "GITHUB_REPOSITORY_OWNER",
89873
- "GITHUB_REPOSITORY_OWNER_ID",
89874
- "GITHUB_REPOSITORY",
89875
- "GITHUB_REPOSITORY_ID"
89876
- ]),
89877
- workflow: hashEnvironmentVariables("GHW", [
89891
+ github_repository_hash: repository,
89892
+ github_workflow_hash: hashEnvironmentVariables("GHW", [
89878
89893
"GITHUB_SERVER_URL",
89879
89894
"GITHUB_REPOSITORY_OWNER",
89880
89895
"GITHUB_REPOSITORY_OWNER_ID",
89881
89896
"GITHUB_REPOSITORY",
89882
89897
"GITHUB_REPOSITORY_ID",
89883
89898
"GITHUB_WORKFLOW"
89884
89899
]),
89885
- job : hashEnvironmentVariables("GHWJ", [
89900
+ github_workflow_job_hash : hashEnvironmentVariables("GHWJ", [
89886
89901
"GITHUB_SERVER_URL",
89887
89902
"GITHUB_REPOSITORY_OWNER",
89888
89903
"GITHUB_REPOSITORY_OWNER_ID",
@@ -89891,7 +89906,7 @@ function identify(projectName) {
89891
89906
"GITHUB_WORKFLOW",
89892
89907
"GITHUB_JOB"
89893
89908
]),
89894
- run : hashEnvironmentVariables("GHWJR", [
89909
+ github_workflow_run_hash : hashEnvironmentVariables("GHWJR", [
89895
89910
"GITHUB_SERVER_URL",
89896
89911
"GITHUB_REPOSITORY_OWNER",
89897
89912
"GITHUB_REPOSITORY_OWNER_ID",
@@ -89901,22 +89916,10 @@ function identify(projectName) {
89901
89916
"GITHUB_JOB",
89902
89917
"GITHUB_RUN_ID"
89903
89918
]),
89904
- run_differentiator: hashEnvironmentVariables("GHWJA", [
89905
- "GITHUB_SERVER_URL",
89906
- "GITHUB_REPOSITORY_OWNER",
89907
- "GITHUB_REPOSITORY_OWNER_ID",
89908
- "GITHUB_REPOSITORY",
89909
- "GITHUB_REPOSITORY_ID",
89910
- "GITHUB_WORKFLOW",
89911
- "GITHUB_JOB",
89912
- "GITHUB_RUN_ID",
89913
- "GITHUB_RUN_NUMBER",
89914
- "GITHUB_RUN_ATTEMPT",
89915
- "INVOCATION_ID"
89916
- ]),
89917
- groups: {
89918
- ci: "github-actions",
89919
- project: projectName,
89919
+ github_workflow_run_differentiator_hash: run_differentiator,
89920
+ $session_id: run_differentiator,
89921
+ $groups: {
89922
+ github_repository: repository,
89920
89923
github_organization: hashEnvironmentVariables("GHO", [
89921
89924
"GITHUB_SERVER_URL",
89922
89925
"GITHUB_REPOSITORY_OWNER",
@@ -90079,9 +90082,7 @@ var IdsHost = class {
90079
90082
}
90080
90083
try {
90081
90084
const diagnosticUrl = await this.getRootUrl();
90082
- diagnosticUrl.pathname += this.idsProjectName;
90083
- diagnosticUrl.pathname += "/";
90084
- diagnosticUrl.pathname += this.diagnosticsSuffix || "diagnostics";
90085
+ diagnosticUrl.pathname += "events/batch";
90085
90086
return diagnosticUrl;
90086
90087
} catch (err) {
90087
90088
core.info(
@@ -90485,9 +90486,10 @@ var DetSysAction = class {
90485
90486
this.facts[target] = value;
90486
90487
}
90487
90488
}
90488
- this.identity = identify(this.actionOptions.name );
90489
+ this.identity = identify();
90489
90490
this.archOs = getArchOs();
90490
90491
this.nixSystem = getNixPlatform(this.archOs);
90492
+ this.facts.$app_name = `${this.actionOptions.name}/action`;
90491
90493
this.facts.arch_os = this.archOs;
90492
90494
this.facts.nix_system = this.nixSystem;
90493
90495
{
@@ -90553,7 +90555,7 @@ var DetSysAction = class {
90553
90555
return await this.idsHost.getDiagnosticsUrl();
90554
90556
}
90555
90557
getUniqueId() {
90556
- return this.identity.run_differentiator || process.env.RUNNER_TRACKING_ID || (0,external_crypto_.randomUUID)();
90558
+ return this.identity.github_workflow_run_differentiator_hash || process.env.RUNNER_TRACKING_ID || (0,external_crypto_.randomUUID)();
90557
90559
}
90558
90560
// This ID will be saved in the action's state, to be persisted across phase steps
90559
90561
getCrossPhaseId() {
@@ -90570,13 +90572,20 @@ var DetSysAction = class {
90570
90572
recordEvent(eventName, context = {}) {
90571
90573
const prefixedName = eventName === "$feature_flag_called" ? eventName : `${this.actionOptions.eventPrefix}${eventName}`;
90572
90574
this.events.push({
90573
- event_name : prefixedName,
90574
- context,
90575
- correlation : this.identity,
90576
- facts: this.facts,
90577
- features: this.featureEventMetadata ,
90575
+ name : prefixedName,
90576
+ // Use the anon distinct ID as the distinct ID until we actually have a distinct ID in the future
90577
+ distinct_id : this.identity.$anon_distinct_id ,
90578
+ // distinct_id
90579
+ uuid: (0,external_crypto_.randomUUID)() ,
90578
90580
timestamp: /* @__PURE__ */ new Date(),
90579
- uuid: (0,external_crypto_.randomUUID)()
90581
+ properties: {
90582
+ ...context,
90583
+ ...this.identity,
90584
+ ...this.facts,
90585
+ ...Object.fromEntries(
90586
+ Object.entries(this.featureEventMetadata).map(([name, variant]) => [`$feature/${name}`, variant])
90587
+ )
90588
+ }
90580
90589
});
90581
90590
}
90582
90591
/**
@@ -90747,12 +90756,19 @@ var DetSysAction = class {
90747
90756
}
90748
90757
try {
90749
90758
core.debug(`Preflighting via ${checkInUrl}`);
90750
- checkInUrl.searchParams.set("ci", "github");
90751
- checkInUrl.searchParams.set(
90752
- "correlation",
90753
- JSON.stringify(this.identity)
90754
- );
90755
- return (await this.getClient()).get(checkInUrl, {
90759
+ const props = {
90760
+ // Use a distinct_id when we actually have one
90761
+ distinct_id: this.identity.$anon_distinct_id,
90762
+ anon_distinct_id: this.identity.$anon_distinct_id,
90763
+ groups: this.identity.$groups,
90764
+ person_properties: {
90765
+ ci: "github",
90766
+ ...this.identity,
90767
+ ...this.facts
90768
+ }
90769
+ };
90770
+ return (await this.getClient()).post(checkInUrl, {
90771
+ json: props,
90756
90772
timeout: {
90757
90773
request: CHECK_IN_ENDPOINT_TIMEOUT_MS
90758
90774
}
@@ -91093,9 +91109,8 @@ var DetSysAction = class {
91093
91109
return;
91094
91110
}
91095
91111
const batch = {
91096
- type: "eventlog",
91097
91112
sent_at: /* @__PURE__ */ new Date(),
91098
- events : this.events
91113
+ batch : this.events
91099
91114
};
91100
91115
try {
91101
91116
await (await this.getClient()).post(diagnosticsUrl, {
0 commit comments