Skip to content

Commit

Permalink
fix(otel_log_handler): always transition to idle state after exportin…
Browse files Browse the repository at this point in the history
…g to trigger next export_logs action
  • Loading branch information
SergeTupchiy committed Oct 13, 2023
1 parent 7c0a018 commit 4401341
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/opentelemetry_experimental/src/otel_log_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ exporting(enter, _OldState, _Data) ->
exporting(internal, export, Data=#data{exporter=Exporter,
resource=Resource,
config=Config,
batch=Batch}) when map_size(Batch) =/= 0 ->
_ = export(Exporter, Resource, Batch, Config),
batch=Batch}) ->
map_size(Batch) =:= 0 orelse export(Exporter, Resource, Batch, Config),
{next_state, idle, Data#data{batch=#{}}};
exporting(EventType, EventContent, Data) ->
handle_event(EventType, EventContent, Data).
Expand Down

0 comments on commit 4401341

Please sign in to comment.