Home
last modified time | relevance | path

Searched refs:spanContext (Results 1 – 25 of 32) sorted by relevance

12

/external/opencensus-java/api/src/test/java/io/opencensus/trace/
DLinkTest.java36 private final SpanContext spanContext = field in LinkTest
49 Link link = Link.fromSpanContext(spanContext, Type.CHILD_LINKED_SPAN); in fromSpanContext_ChildLink()
50 assertThat(link.getTraceId()).isEqualTo(spanContext.getTraceId()); in fromSpanContext_ChildLink()
51 assertThat(link.getSpanId()).isEqualTo(spanContext.getSpanId()); in fromSpanContext_ChildLink()
57 Link link = Link.fromSpanContext(spanContext, Type.CHILD_LINKED_SPAN, attributesMap); in fromSpanContext_ChildLink_WithAttributes()
58 assertThat(link.getTraceId()).isEqualTo(spanContext.getTraceId()); in fromSpanContext_ChildLink_WithAttributes()
59 assertThat(link.getSpanId()).isEqualTo(spanContext.getSpanId()); in fromSpanContext_ChildLink_WithAttributes()
66 Link link = Link.fromSpanContext(spanContext, Type.PARENT_LINKED_SPAN); in fromSpanContext_ParentLink()
67 assertThat(link.getTraceId()).isEqualTo(spanContext.getTraceId()); in fromSpanContext_ParentLink()
68 assertThat(link.getSpanId()).isEqualTo(spanContext.getSpanId()); in fromSpanContext_ParentLink()
[all …]
DSpanTest.java37 private SpanContext spanContext; field in SpanTest
44 spanContext = in setUp()
64 new NoopSpan(spanContext, null); in newSpan_SampledContextAndNullOptions()
69 new NoopSpan(spanContext, EnumSet.noneOf(Span.Options.class)); in newSpan_SampledContextAndEmptyOptions()
80 Span span = new NoopSpan(spanContext, spanOptions); in getContextAndOptions()
81 assertThat(span.getContext()).isEqualTo(spanContext); in getContextAndOptions()
87 Span span = Mockito.spy(new NoopSpan(spanContext, spanOptions)); in putAttributeCallsAddAttributesByDefault()
97 Span span = Mockito.spy(new NoopSpan(spanContext, spanOptions)); in endCallsEndWithDefaultOptions()
/external/opencensus-java/contrib/log_correlation/log4j2/src/main/java/io/opencensus/contrib/logcorrelation/log4j2/
DContextDataUtils.java68 SpanContext spanContext = shouldAddTracingDataToLogEvent(spanSelection); in shareableRawContextData() local
69 return spanContext == null in shareableRawContextData()
71 : getShareableContextAndTracingData(spanContext); in shareableRawContextData()
75 SpanContext spanContext = shouldAddTracingDataToLogEvent(spanSelection); in nonShareableRawContextData() local
76 return spanContext == null in nonShareableRawContextData()
78 : getShareableContextAndTracingData(spanContext); in nonShareableRawContextData()
89 SpanContext spanContext = getCurrentSpanContext(); in shouldAddTracingDataToLogEvent() local
90 if (spanContext.getTraceOptions().isSampled()) { in shouldAddTracingDataToLogEvent()
91 return spanContext; in shouldAddTracingDataToLogEvent()
122 private static StringMap getShareableContextAndTracingData(SpanContext spanContext) { in getShareableContextAndTracingData() argument
[all …]
/external/opencensus-java/api/src/main/java/io/opencensus/trace/propagation/
DBinaryFormat.java78 public byte[] toBinaryValue(SpanContext spanContext) { in toBinaryValue() argument
79 return toByteArray(spanContext); in toBinaryValue()
90 public byte[] toByteArray(SpanContext spanContext) { in toByteArray() argument
92 return toBinaryValue(spanContext); in toByteArray()
143 public byte[] toByteArray(SpanContext spanContext) { in toByteArray() argument
144 Utils.checkNotNull(spanContext, "spanContext"); in toByteArray()
DTextFormat.java110 SpanContext spanContext, C carrier, Setter<C> setter); in inject() argument
191 SpanContext spanContext, C carrier, Setter<C> setter) { in inject() argument
192 Utils.checkNotNull(spanContext, "spanContext"); in inject()
/external/opencensus-java/api/src/test/java/io/opencensus/trace/export/
DSpanDataTest.java72 private final SpanContext spanContext = field in SpanDataTest
105 linksList.add(Link.fromSpanContext(spanContext, Type.CHILD_LINKED_SPAN)); in setUp()
113 spanContext, in spanData_AllValues()
126 assertThat(spanData.getContext()).isEqualTo(spanContext); in spanData_AllValues()
146 spanContext, in spanData_Create_Compatibility()
159 assertThat(spanData.getContext()).isEqualTo(spanContext); in spanData_Create_Compatibility()
178 spanContext, in spanData_RootActiveSpan()
191 assertThat(spanData.getContext()).isEqualTo(spanContext); in spanData_RootActiveSpan()
210 spanContext, in spanData_AllDataEmpty()
223 assertThat(spanData.getContext()).isEqualTo(spanContext); in spanData_AllDataEmpty()
[all …]
/external/opencensus-java/contrib/appengine_standard_util/src/test/java/io/opencensus/contrib/appengine/standard/util/
DAppEngineCloudTraceContextUtilsTest.java65 SpanContext spanContext = in toFromSampledCloudTraceContext() local
68 assertThat(spanContext) in toFromSampledCloudTraceContext()
77 AppEngineCloudTraceContextUtils.toCloudTraceContext(spanContext); in toFromSampledCloudTraceContext()
113 SpanContext spanContext = in toFromNotSampledCloudTraceContext() local
116 assertThat(spanContext) in toFromNotSampledCloudTraceContext()
126 AppEngineCloudTraceContextUtils.toCloudTraceContext(spanContext), in toFromNotSampledCloudTraceContext()
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/trace/
DRecordEventsSpanImplTest.java58 private final SpanContext spanContext = field in RecordEventsSpanImplTest
88 spanContext, in noEventsRecordedAfterEnd()
108 span.addLink(Link.fromSpanContext(spanContext, Link.Type.CHILD_LINKED_SPAN)); in noEventsRecordedAfterEnd()
123 spanContext, in deprecatedAddAttributesStillWorks()
142 spanContext, in toSpanData_ActiveSpan()
165 Link link = Link.fromSpanContext(spanContext, Link.Type.CHILD_LINKED_SPAN); in toSpanData_ActiveSpan()
168 assertThat(spanData.getContext()).isEqualTo(spanContext); in toSpanData_ActiveSpan()
201 spanContext, in toSpanData_EndedSpan()
223 Link link = Link.fromSpanContext(spanContext, Link.Type.CHILD_LINKED_SPAN); in toSpanData_EndedSpan()
229 assertThat(spanData.getContext()).isEqualTo(spanContext); in toSpanData_EndedSpan()
[all …]
DNoRecordEventsSpanImplTest.java45 private final SpanContext spanContext = field in NoRecordEventsSpanImplTest
52 NoRecordEventsSpanImpl.create(spanContext);
56 assertThat(noRecordEventsSpan.getContext()).isEqualTo(spanContext); in propagatesSpanContext()
/external/opencensus-java/contrib/appengine_standard_util/src/main/java/io/opencensus/contrib/appengine/standard/util/
DAppEngineCloudTraceContextUtils.java83 public static CloudTraceContext toCloudTraceContext(SpanContext spanContext) { in toCloudTraceContext() argument
84 checkNotNull(spanContext, "spanContext"); in toCloudTraceContext()
86 ByteBuffer traceIdBuf = ByteBuffer.wrap(spanContext.getTraceId().getBytes()); in toCloudTraceContext()
89 ByteBuffer spanIdBuf = ByteBuffer.wrap(spanContext.getSpanId().getBytes()); in toCloudTraceContext()
94 spanContext.getTraceOptions().isSampled() ? 1L : 0L); in toCloudTraceContext()
/external/opencensus-java/contrib/exemplar_util/src/main/java/io/opencensus/contrib/exemplar/util/
DExemplarUtils.java63 public static void putSpanContextAttachments(MeasureMap measureMap, SpanContext spanContext) { in putSpanContextAttachments() argument
65 checkNotNull(spanContext, "spanContext"); in putSpanContextAttachments()
66 measureMap.putAttachment(ATTACHMENT_KEY_TRACE_ID, spanContext.getTraceId().toLowerBase16()); in putSpanContextAttachments()
67 measureMap.putAttachment(ATTACHMENT_KEY_SPAN_ID, spanContext.getSpanId().toLowerBase16()); in putSpanContextAttachments()
/external/opencensus-java/impl_core/src/jmh/java/io/opencensus/implcore/trace/propagation/
DBinaryFormatImplBenchmark.java42 private SpanContext spanContext; field in BinaryFormatImplBenchmark.Data
49 spanContext = in setup()
55 spanContextBinary = binaryFormat.toByteArray(spanContext); in setup()
67 return data.binaryFormat.toByteArray(data.spanContext); in toBinarySpanContext()
88 return data.binaryFormat.fromByteArray(data.binaryFormat.toByteArray(data.spanContext)); in toFromBinarySpanContext()
DB3FormatImplBenchmark.java46 private SpanContext spanContext; field in B3FormatImplBenchmark.Data
53 spanContext = in setup()
60 textFormatBase.inject(spanContext, spanContextHeaders); in setup()
73 data.textFormatBase.inject(data.spanContext, carrier); in inject()
96 data.textFormatBase.inject(data.spanContext, carrier); in injectExtract()
DTextFormatBenchmarkBase.java52 void inject(SpanContext spanContext, Map<String, String> carrier) { in inject() argument
53 textFormat.inject(spanContext, carrier, setter); in inject()
/external/opencensus-java/impl_core/src/main/java/io/opencensus/implcore/trace/propagation/
DBinaryFormatImpl.java95 public byte[] toByteArray(SpanContext spanContext) { in toByteArray() argument
96 checkNotNull(spanContext, "spanContext"); in toByteArray()
100 spanContext.getTraceId().copyBytesTo(bytes, TRACE_ID_OFFSET); in toByteArray()
102 spanContext.getSpanId().copyBytesTo(bytes, SPAN_ID_OFFSET); in toByteArray()
104 spanContext.getTraceOptions().copyBytesTo(bytes, TRACE_OPTIONS_OFFSET); in toByteArray()
DB3Format.java68 SpanContext spanContext, C carrier, Setter<C> setter) { in inject() argument
69 checkNotNull(spanContext, "spanContext"); in inject()
72 setter.put(carrier, X_B3_TRACE_ID, spanContext.getTraceId().toLowerBase16()); in inject()
73 setter.put(carrier, X_B3_SPAN_ID, spanContext.getSpanId().toLowerBase16()); in inject()
74 if (spanContext.getTraceOptions().isSampled()) { in inject()
/external/opencensus-java/contrib/http_util/src/main/java/io/opencensus/contrib/http/util/
DCloudTraceFormat.java90 SpanContext spanContext, C carrier, Setter<C> setter) { in inject() argument
91 checkNotNull(spanContext, "spanContext"); in inject()
96 .append(spanContext.getTraceId().toLowerBase16()) in inject()
98 .append(UnsignedLongs.toString(spanIdToLong(spanContext.getSpanId()))) in inject()
100 .append(spanContext.getTraceOptions().isSampled() ? SAMPLED : NOT_SAMPLED); in inject()
/external/opencensus-java/contrib/log_correlation/log4j2/src/test/java/io/opencensus/contrib/logcorrelation/log4j2/
DAbstractOpenCensusLog4jLogCorrelationTest.java67 String log4jPattern, SpanContext spanContext, Function<Logger, Void> loggingFunction) { in logWithSpanAndLog4jConfiguration() argument
81 logWithSpan(spanContext, loggingFunction, logger); in logWithSpanAndLog4jConfiguration()
89 SpanContext spanContext, Function<Logger, Void> loggingFunction, Logger logger) { in logWithSpan() argument
90 Scope scope = tracer.withSpan(new TestSpan(spanContext)); in logWithSpan()
DOpenCensusTraceContextDataInjectorTest.java155 SpanContext spanContext = in rawContextDataWithTracingData() local
161 Scope scope = tracer.withSpan(new TestSpan(spanContext)); in rawContextDataWithTracingData()
188 SpanContext spanContext = in rawContextDataWithoutTracingData() local
194 Scope scope = tracer.withSpan(new TestSpan(spanContext)); in rawContextDataWithoutTracingData()
/external/opencensus-java/contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/
DOpenCensusSleuthSpanContextHolder.java121 private static void setSpanContextInternal(SpanContext spanContext) { in setSpanContextInternal() argument
122 CURRENT_SPAN.set(spanContext); in setSpanContextInternal()
123 spanContext.ocCurrentContext.attach(); in setSpanContextInternal()
/external/opencensus-java/exporters/trace/stackdriver/src/test/java/io/opencensus/exporter/trace/stackdriver/
DStackdriverV2ExporterHandlerProtoTest.java107 private static final SpanContext spanContext = SpanContext.create(traceId, spanId, traceOptions); field in StackdriverV2ExporterHandlerProtoTest
118 ImmutableList.of(Link.fromSpanContext(spanContext, Link.Type.CHILD_LINKED_SPAN));
190 spanContext, in generateSpan()
343 spanContext, in generateSpan_WithResourceLabels()
380 spanContext, in mapHttpAttributes()
410 spanContext, in generateSpanName_ForServer()
431 spanContext, in generateSpanName_ForServerWithRecv()
452 spanContext, in generateSpanName_ForClient()
473 spanContext, in generateSpanName_ForClientWithSent()
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/trace/propagation/
DBinaryFormatImplTest.java54 private void testSpanContextConversion(SpanContext spanContext) throws SpanContextParseException { in testSpanContextConversion() argument
56 binaryFormat.fromByteArray(binaryFormat.toByteArray(spanContext)); in testSpanContextConversion()
60 .isEqualTo(spanContext); in testSpanContextConversion()
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/trace/export/
DNoopRunningSpanStoreImplTest.java50 private final SpanContext spanContext = field in NoopRunningSpanStoreImplTest
68 spanContext, in setUp()
DNoopSampledSpanStoreImplTest.java55 private final SpanContext spanContext = field in NoopSampledSpanStoreImplTest
101 spanContext, in noopImplementation()
/external/opencensus-java/exporters/trace/instana/src/main/java/io/opencensus/exporter/trace/instana/
DInstanaExporterHandler.java133 final SpanContext spanContext = span.getContext(); in convertToJson() local
145 sb.append("\"spanId\":\"").append(encodeSpanId(spanContext.getSpanId())).append("\","); in convertToJson()
146 sb.append("\"traceId\":\"").append(encodeTraceId(spanContext.getTraceId())).append("\","); in convertToJson()

12