forked from mgoldman-gavant/aws-xray-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* no op trace id generation * added clean up in tests and minor changes * modified typo * added checking false only conditions
- Loading branch information
1 parent
48dfb37
commit 5df17d3
Showing
5 changed files
with
134 additions
and
9 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
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,23 @@ | ||
class NoOpTraceId: | ||
""" | ||
A trace ID tracks the path of a request through your application. | ||
A trace collects all the segments generated by a single request. | ||
A trace ID is required for a segment. | ||
""" | ||
VERSION = '1' | ||
DELIMITER = '-' | ||
|
||
def __init__(self): | ||
""" | ||
Generate a no-op trace id. | ||
""" | ||
self.start_time = '00000000' | ||
self.__number = '000000000000000000000000' | ||
|
||
def to_id(self): | ||
""" | ||
Convert TraceId object to a string. | ||
""" | ||
return "%s%s%s%s%s" % (NoOpTraceId.VERSION, NoOpTraceId.DELIMITER, | ||
self.start_time, | ||
NoOpTraceId.DELIMITER, self.__number) |
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