-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
…moves dependency on ls tracer code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments for a few things that could be checked out first.
start = start or 0 | ||
end = end or 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the idea behind this or 0
? Can start
or end
be False
or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can be None
|
||
def shutdown(self) -> None: | ||
self.tracer.flush() | ||
"""Flush remaining spans""" | ||
# self.tracer.flush() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the docstring, removed the comment. Currently there's no need to implement anything in the shutdown.
|
||
|
||
class LightStepSpanExporter(LightstepSpanExporter): | ||
"""Backwards compatibility wrapper class""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a DeprecationWarning
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
|
||
def _generate_guid(): | ||
"""Construct a guid - a random 64 bit integer""" | ||
return _GUID_RNG.getrandbits(64) - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a heads up, this could return a negative value (because of the - 1
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed.
Co-Authored-By: Diego Hurtado <[email protected]>
Co-Authored-By: Diego Hurtado <[email protected]>
Co-Authored-By: Diego Hurtado <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Initial implementation of a metrics exporter. As part of the changes here, I'm refactoring the SpanExporter to use protos directly, which removes the dependency on the lightstep-tracer ibrary as well as thrift.
There are a few parts in this change:
Note:
The
collector_pb2.py
andmetrics_pb2.py
files are generated, probably not worth reviewing.