Skip to content

Commit

Permalink
Document why a random number is added to traceId
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenraad Verheyden committed Dec 15, 2020
1 parent 8e12489 commit 3db32e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,7 @@ function run() {
util.getEnv('GITHUB_JOB'),
util.getEnv('GITHUB_RUN_NUMBER'),
core.getInput('matrix-key'),
// append a random number to ensure traceId is unique when the workflow is re-run
util.randomInt(Math.pow(2, 32)).toString()
];
const traceId = util.replaceSpaces(traceComponents.filter(value => value).join('-'));
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ async function run(): Promise<void> {
util.getEnv('GITHUB_JOB'),
util.getEnv('GITHUB_RUN_NUMBER'),
core.getInput('matrix-key'),
// append a random number to ensure traceId is unique when the workflow is re-run
util.randomInt(2 ** 32).toString()
]
const traceId = util.replaceSpaces(traceComponents.filter(value => value).join('-'))
Expand Down

0 comments on commit 3db32e1

Please sign in to comment.