-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2202 from josephschorr/trace-node-id
Small changes around node IDs and trace IDs
- Loading branch information
Showing
4 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package graph | ||
|
||
import ( | ||
"github.com/google/uuid" | ||
) | ||
|
||
// NewTraceID generates a new trace ID. The trace IDs will only be unique with | ||
// a single dispatch request tree and should not be used for any other purpose. | ||
// This function currently uses the UUID library to generate a new trace ID, | ||
// which means it should not be invoked from performance-critical code paths. | ||
func NewTraceID() string { | ||
return uuid.NewString() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters