-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add is_remote_parent span flags to OTLP exported Spans and SpanLinks
Signed-off-by: Alexander Wert <[email protected]>
- Loading branch information
1 parent
8937a10
commit e79e3ee
Showing
4 changed files
with
93 additions
and
16 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...mmon/src/main/java/io/opentelemetry/exporter/internal/otlp/traces/ProtoSpanFlagsUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.exporter.internal.otlp.traces; | ||
|
||
import io.opentelemetry.api.trace.SpanContext; | ||
|
||
public final class ProtoSpanFlagsUtil { | ||
|
||
private ProtoSpanFlagsUtil() {} | ||
|
||
public static final int SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK = 0x00000100; | ||
public static final int SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK = 0x00000200; | ||
|
||
static int getFullSpanFlags(byte w3cTraceflags, SpanContext parentContext) { | ||
int flags = w3cTraceflags; | ||
|
||
flags = flags | SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK; | ||
if (parentContext.isRemote()) { | ||
flags = flags | SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK; | ||
} | ||
|
||
return flags; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters