Closed driv3r closed 7 years ago
I would also check the add context plug to make sure that it behaves well w/ the defaults
I wonder if the test failure we're seeing here implies that we're adding over 2ms overhead every time we make a span :/ I think after we get this cleanup setup that some benchmarking is in order.
Makes sense although from what I quickly checked it's just first execution only, in iex first run for Spandex.Datadog.Span.new()
takes ~4ms, next calls are around ~26-50 microseconds. Still we should check it out, I would say that at least publishing trace to agent should be made from a separate gen server with some retries asynchronously (as now it take place on trace finish as far as I understand)
I definitely agree about starting a trace sending server. I'll make an issue for it.
Ok, I think that's all for this PR, I actually should only update AddContext
plug by removing entries which are already set in start_trace
, but I also added tests and check if we actually trace stuff. Still a lot of tests to add.
I'll tackle #6 in separate PR after this one is merged
This way we can ensure that we always set sane defaults based on configuration settings.
Span.new/1
inSpan.child_of/1
?%Span{}
struct everywhere instead of plain map, wdys?Fixes #7
Span.new/1
constructor with defaultsSpan.begin(new())
Plug.*
modulesPlug.Conn.assigns
Span
Plug.*
modules