Skip to content

Commit

Permalink
exporter/jaeger: Either collector submit batch or Agent emit batch (#982
Browse files Browse the repository at this point in the history
)

* Either collector submit batch or Agent emit batch
  • Loading branch information
vtdat authored Aug 26, 2020
1 parent dfc7aa5 commit e21ee21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def export(self, spans):

if self.collector is not None:
self.collector.submit(batch)
self.agent_client.emit(batch)
else:
self.agent_client.emit(batch)

return SpanExportResult.SUCCESS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def test_export(self):
exporter._collector = collector_mock

exporter.export((self._test_span,))
self.assertEqual(agent_client_mock.emit.call_count, 2)
self.assertEqual(agent_client_mock.emit.call_count, 1)
self.assertEqual(collector_mock.submit.call_count, 1)

def test_agent_client(self):
Expand Down

0 comments on commit e21ee21

Please sign in to comment.