@Before public void setUp() { attributesMap.put("MyAttributeKey1", AttributeValue.longAttributeValue(10)); attributesMap.put("MyAttributeKey2", AttributeValue.booleanAttributeValue(true)); attributes = Attributes.create(attributesMap, 1); annotationsList.add(SpanData.TimedEvent.create(eventTimestamp1, annotation)); annotationsList.add(SpanData.TimedEvent.create(eventTimestamp3, annotation)); annotations = TimedEvents.create(annotationsList, 2); networkEventsList.add(SpanData.TimedEvent.create(eventTimestamp1, recvNetworkEvent)); networkEventsList.add(SpanData.TimedEvent.create(eventTimestamp2, sentNetworkEvent)); networkEvents = TimedEvents.create(networkEventsList, 3); messageEventsList.add(SpanData.TimedEvent.create(eventTimestamp1, recvMessageEvent)); messageEventsList.add(SpanData.TimedEvent.create(eventTimestamp2, sentMessageEvent)); messageEvents = TimedEvents.create(messageEventsList, 3); linksList.add(Link.fromSpanContext(spanContext, Type.CHILD_LINKED_SPAN)); links = Links.create(linksList, 0); }
null, startTimestamp, Attributes.create(Collections.<String, AttributeValue>emptyMap(), 0), TimedEvents.create(Collections.<SpanData.TimedEvent<Annotation>>emptyList(), 0), TimedEvents.create(Collections.<SpanData.TimedEvent<MessageEvent>>emptyList(), 0),
SpanData.Attributes attributesSpanData = attributes == null ? SpanData.Attributes.create(Collections.<String, AttributeValue>emptyMap(), 0) : SpanData.Attributes.create(attributes, attributes.getNumberOfDroppedAttributes()); SpanData.TimedEvents<Annotation> annotationsSpanData = createTimedEvents(getInitializedAnnotations(), timestampConverter);
Kind.SERVER, Timestamp.fromMillis(startTime), SpanData.Attributes.create(sampleAttributes(), 0), SpanData.TimedEvents.create(singletonList(sampleAnnotation()), 0), SpanData.TimedEvents.create(singletonList(sampleMessageEvent()), 0),
null, startTimestamp, Attributes.create(Collections.<String, AttributeValue>emptyMap(), 0), TimedEvents.create(Collections.<SpanData.TimedEvent<Annotation>>emptyList(), 0), TimedEvents.create(Collections.<SpanData.TimedEvent<MessageEvent>>emptyList(), 0),
Attributes.create(attributeMap, 0 /* droppedAttributesCount */), TimedEvents.create(annotations, 0 /* droppedEventsCount */), TimedEvents.create(messageEvents, 0 /* droppedEventsCount */),
attributesMap.put( "http.status_code", io.opencensus.trace.AttributeValue.longAttributeValue(200L)); SpanData.Attributes httpAttributes = SpanData.Attributes.create(attributesMap, 0);
SpanData.Attributes attributesSpanData = attributes == null ? SpanData.Attributes.create(Collections.<String, AttributeValue>emptyMap(), 0) : SpanData.Attributes.create(attributes, attributes.getNumberOfDroppedAttributes()); SpanData.TimedEvents<Annotation> annotationsSpanData = createTimedEvents(getInitializedAnnotations(), timestampConverter);
SpanData.Attributes.create(attributes, 0), SpanData.TimedEvents.create(annotations, 0), SpanData.TimedEvents.create(messageEvents, 0),
SpanData.Attributes.create(attributes, 0), SpanData.TimedEvents.create(annotations, 0), SpanData.TimedEvents.create(messageEvents, 0),
Attributes.create(attributes, 0 /* droppedAttributesCount */), TimedEvents.create(annotations, 0 /* droppedEventsCount */), TimedEvents.create(messageEvents, 0 /* droppedEventsCount */),
Attributes.create(attributes, 0 /* droppedAttributesCount */), TimedEvents.create(annotations, 0 /* droppedEventsCount */), TimedEvents.create(messageEvents, 0 /* droppedEventsCount */),
Attributes.create(attributes, 0 /* droppedAttributesCount */), TimedEvents.create(annotations, 0 /* droppedEventsCount */), TimedEvents.create(messageEvents, 0 /* droppedEventsCount */),
Attributes.create(attributes, 0 /* droppedAttributesCount */), TimedEvents.create(annotations, 0 /* droppedEventsCount */), TimedEvents.create(messageEvents, 0 /* droppedEventsCount */),
Attributes.create(attributes, 0 /* droppedAttributesCount */), TimedEvents.create(annotations, 0 /* droppedEventsCount */), TimedEvents.create(messageEvents, 0 /* droppedEventsCount */),
Attributes.create(attributes, 0 /* droppedAttributesCount */), TimedEvents.create(annotations, 0 /* droppedEventsCount */), TimedEvents.create(messageEvents, 0 /* droppedEventsCount */),