Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
fix: use correct spec for oc_span:finish_span/2
Browse files Browse the repository at this point in the history
  • Loading branch information
hauleth committed May 2, 2019
1 parent 10fa099 commit b1a55ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/oc_span.erl
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
%% Finish a span, setting the end_time and sending to the reporter.
%% @end
%%--------------------------------------------------------------------
-spec finish_span(opencensus:span_ctx(), maybe(opencensus:span())) -> true.
-spec finish_span(opencensus:span_ctx(), maybe(opencensus:span())) -> ok | {error, term()}.
finish_span(#span_ctx{tracestate=Tracestate}, Span=#span{}) ->
EndTime = wts:timestamp(),
%% update tracestate to what the context has when finished
Span1 = Span#span{end_time=EndTime,
tracestate=Tracestate},
oc_trace_reporter:store_span(Span1);
finish_span(_, _) ->
true.
ok.

%%--------------------------------------------------------------------
%% @doc
Expand Down

0 comments on commit b1a55ca

Please sign in to comment.