Skip to content

Commit

Permalink
Fix the bug that when topic is array (#482)
Browse files Browse the repository at this point in the history
Co-authored-by: Deeka Wong <[email protected]>
  • Loading branch information
huangdijia and huangdijia authored Dec 4, 2023
1 parent 13b0097 commit cbe20d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sentry/src/Tracing/Listener/TracingKafkaListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ public function process(object $event): void
protected function startTransaction(BeforeConsume $event): void
{
$consumer = $event->getConsumer();
$topic = $consumer->getTopic();
$name = is_array($topic) ? implode(',', $topic) : $topic;

$this->continueTrace(
name: $consumer->getTopic(),
name: $name,
op: 'kafka.consume',
description: $consumer::class,
source: TransactionSource::custom()
Expand Down

0 comments on commit cbe20d8

Please sign in to comment.