Skip to content

Commit d25b4df

Browse files
authored
update proto to 1.1.0 (#1215)
updates generated protobuf files to 1.1.0, and adds trace flags to OTLP-encoded spans and span links
1 parent b2aaa0d commit d25b4df

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

SpanConverter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ private function convertSpan(SpanDataInterface $span): Span
148148
$pSpan = new Span();
149149
$pSpan->setTraceId($this->serializer->serializeTraceId($span->getContext()->getTraceIdBinary()));
150150
$pSpan->setSpanId($this->serializer->serializeSpanId($span->getContext()->getSpanIdBinary()));
151+
$pSpan->setFlags($span->getContext()->getTraceFlags());
151152
$pSpan->setTraceState((string) $span->getContext()->getTraceState());
152153
if ($span->getParentContext()->isValid()) {
153154
$pSpan->setParentSpanId($this->serializer->serializeSpanId($span->getParentContext()->getSpanIdBinary()));
@@ -172,6 +173,7 @@ private function convertSpan(SpanDataInterface $span): Span
172173
$pSpan->getLinks()[] = $pLink = new Link();
173174
$pLink->setTraceId($this->serializer->serializeTraceId($link->getSpanContext()->getTraceIdBinary()));
174175
$pLink->setSpanId($this->serializer->serializeSpanId($link->getSpanContext()->getSpanIdBinary()));
176+
$pLink->setFlags($span->getContext()->getTraceFlags());
175177
$pLink->setTraceState((string) $link->getSpanContext()->getTraceState());
176178
$this->setAttributes($pLink, $link->getAttributes());
177179
}

0 commit comments

Comments
 (0)