-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow user to specify start time #94
Conversation
@@ -23,13 +23,13 @@ local mt = { | |||
-- config.attributes: span attributes | |||
-- @return span | |||
------------------------------------------------------------------ | |||
function _M.new(tracer, parent_ctx, ctx, name, config) | |||
function _M.new(tracer, parent_ctx, ctx, name, config, start_time) |
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.
Can we add arg to docstring above?
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.
oh of course, great catch
7484100
to
538fafd
Compare
how did the test pass because I forgot to alter the |
This i think needs some work, I will do additional lua unit testing as well |
* only use for recording spans * yangxikun#86
538fafd
to
4ae2cd9
Compare
@@ -36,6 +36,8 @@ describe("encode_spans", function() | |||
local resource = encoded.resource_spans[1] | |||
assert(#resource.instrumentation_library_spans == 1) | |||
assert(#resource.instrumentation_library_spans[1].spans == 10) | |||
assert(resource.instrumentation_library_spans[1].spans[1].start_time_unix_nano == "123456788") | |||
assert(resource.instrumentation_library_spans[1].spans[1].end_time_unix_nano == "123456789") |
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 nice addition here to check that we are setting and exporting the times we expect on spans
Co-authored-by: Sam <[email protected]>
Tracer.start
#86