fix: use individual span attributes for country codes

Replace stringified JSON countryCodes attribute with individual
countryCode_{code} attributes to improve LogQL query compatibility.
This commit is contained in:
Chirag Aggarwal 2026-02-04 10:15:36 +05:30
parent 5537fe210e
commit 345d8f2db5

View file

@ -201,8 +201,8 @@ class Messaging extends Action
$countryCodes[$countryCode] = ($countryCodes[$countryCode] ?? 0) + 1;
}
}
if (!empty($countryCodes)) {
Span::add('countryCodes', \json_encode($countryCodes));
foreach ($countryCodes as $code => $count) {
Span::add('countryCode_' . $code, $count);
}
}
@ -441,8 +441,8 @@ class Messaging extends Action
$countryCodes[$countryCode] = ($countryCodes[$countryCode] ?? 0) + 1;
}
}
if (!empty($countryCodes)) {
Span::add('countryCodes', \json_encode($countryCodes));
foreach ($countryCodes as $code => $count) {
Span::add('countryCode_' . $code, $count);
}
if ($this->adapter === null) {