Update proto to the latest commit (#1040)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
Bogdan Drutu 2020-03-23 17:25:02 -07:00 committed by GitHub
parent cefa2ab5d5
commit c5eb2c7f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 37 deletions

View File

@ -139,8 +139,8 @@ final class MetricAdapter {
LongPoint longPoint = (LongPoint) point;
Int64DataPoint.Builder builder =
Int64DataPoint.newBuilder()
.setStartTimeUnixnano(longPoint.getStartEpochNanos())
.setTimestampUnixnano(longPoint.getEpochNanos())
.setStartTimeUnixNano(longPoint.getStartEpochNanos())
.setTimeUnixNano(longPoint.getEpochNanos())
.setValue(longPoint.getValue());
// Not calling directly addAllLabels because that generates couple of unnecessary allocations.
Collection<StringKeyValue> labels = toProtoLabels(longPoint.getLabels());
@ -158,8 +158,8 @@ final class MetricAdapter {
DoublePoint doublePoint = (DoublePoint) point;
DoubleDataPoint.Builder builder =
DoubleDataPoint.newBuilder()
.setStartTimeUnixnano(doublePoint.getStartEpochNanos())
.setTimestampUnixnano(doublePoint.getEpochNanos())
.setStartTimeUnixNano(doublePoint.getStartEpochNanos())
.setTimeUnixNano(doublePoint.getEpochNanos())
.setValue(doublePoint.getValue());
// Not calling directly addAllLabels because that generates couple of unnecessary allocations.
Collection<StringKeyValue> labels = toProtoLabels(doublePoint.getLabels());
@ -177,8 +177,8 @@ final class MetricAdapter {
SummaryPoint summaryPoint = (SummaryPoint) point;
SummaryDataPoint.Builder builder =
SummaryDataPoint.newBuilder()
.setStartTimeUnixnano(summaryPoint.getStartEpochNanos())
.setTimestampUnixnano(summaryPoint.getEpochNanos())
.setStartTimeUnixNano(summaryPoint.getStartEpochNanos())
.setTimeUnixNano(summaryPoint.getEpochNanos())
.setCount(summaryPoint.getCount())
.setSum(summaryPoint.getSum());
// Not calling directly addAllLabels because that generates couple of unnecessary allocations

View File

@ -91,8 +91,8 @@ final class SpanAdapter {
builder.setParentSpanId(TraceProtoUtils.toProtoSpanId(spanData.getParentSpanId()));
builder.setName(spanData.getName());
builder.setKind(toProtoSpanKind(spanData.getKind()));
builder.setStartTimeUnixnano(spanData.getStartEpochNanos());
builder.setEndTimeUnixnano(spanData.getEndEpochNanos());
builder.setStartTimeUnixNano(spanData.getStartEpochNanos());
builder.setEndTimeUnixNano(spanData.getEndEpochNanos());
for (Map.Entry<String, AttributeValue> resourceEntry : spanData.getAttributes().entrySet()) {
builder.addAttributes(
CommonAdapter.toProtoAttribute(resourceEntry.getKey(), resourceEntry.getValue()));
@ -131,7 +131,7 @@ final class SpanAdapter {
static Span.Event toProtoSpanEvent(TimedEvent timedEvent) {
Span.Event.Builder builder = Span.Event.newBuilder();
builder.setName(timedEvent.getName());
builder.setTimeUnixnano(timedEvent.getEpochNanos());
builder.setTimeUnixNano(timedEvent.getEpochNanos());
for (Map.Entry<String, AttributeValue> resourceEntry : timedEvent.getAttributes().entrySet()) {
builder.addAttributes(
CommonAdapter.toProtoAttribute(resourceEntry.getKey(), resourceEntry.getValue()));

View File

@ -102,8 +102,8 @@ public class MetricAdapterTest {
MetricData.LongPoint.create(123, 456, Collections.singletonMap("k", "v"), 5))))
.containsExactly(
Int64DataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))
@ -117,13 +117,13 @@ public class MetricAdapterTest {
MetricData.LongPoint.create(321, 654, Collections.singletonMap("k", "v"), 7))))
.containsExactly(
Int64DataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.setValue(5)
.build(),
Int64DataPoint.newBuilder()
.setStartTimeUnixnano(321)
.setTimestampUnixnano(654)
.setStartTimeUnixNano(321)
.setTimeUnixNano(654)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))
@ -142,8 +142,8 @@ public class MetricAdapterTest {
123, 456, Collections.singletonMap("k", "v"), 5.1))))
.containsExactly(
DoubleDataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))
@ -158,13 +158,13 @@ public class MetricAdapterTest {
321, 654, Collections.singletonMap("k", "v"), 7.1))))
.containsExactly(
DoubleDataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.setValue(5.1)
.build(),
DoubleDataPoint.newBuilder()
.setStartTimeUnixnano(321)
.setTimestampUnixnano(654)
.setStartTimeUnixNano(321)
.setTimeUnixNano(654)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))
@ -188,8 +188,8 @@ public class MetricAdapterTest {
Collections.singletonList(MetricData.ValueAtPercentile.create(0.9, 1.1))))))
.containsExactly(
SummaryDataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))
@ -220,14 +220,14 @@ public class MetricAdapterTest {
MetricData.ValueAtPercentile.create(0.99, 20.3))))))
.containsExactly(
SummaryDataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.setCount(7)
.setSum(15.3)
.build(),
SummaryDataPoint.newBuilder()
.setStartTimeUnixnano(321)
.setTimestampUnixnano(654)
.setStartTimeUnixNano(321)
.setTimeUnixNano(654)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))
@ -308,8 +308,8 @@ public class MetricAdapterTest {
.addAllInt64DataPoints(
Collections.singletonList(
Int64DataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))
@ -345,8 +345,8 @@ public class MetricAdapterTest {
.addAllDoubleDataPoints(
Collections.singletonList(
DoubleDataPoint.newBuilder()
.setStartTimeUnixnano(123)
.setTimestampUnixnano(456)
.setStartTimeUnixNano(123)
.setTimeUnixNano(456)
.addAllLabels(
Collections.singletonList(
StringKeyValue.newBuilder().setKey("k").setValue("v").build()))

View File

@ -84,8 +84,8 @@ public class SpanAdapterTest {
assertThat(span.getParentSpanId().toByteArray()).isEqualTo(new byte[] {0, 0, 0, 0, 0, 0, 0, 0});
assertThat(span.getName()).isEqualTo("GET /api/endpoint");
assertThat(span.getKind()).isEqualTo(SpanKind.SERVER);
assertThat(span.getStartTimeUnixnano()).isEqualTo(12345);
assertThat(span.getEndTimeUnixnano()).isEqualTo(12349);
assertThat(span.getStartTimeUnixNano()).isEqualTo(12345);
assertThat(span.getEndTimeUnixNano()).isEqualTo(12349);
assertThat(span.getAttributesList())
.containsExactly(
AttributeKeyValue.newBuilder()
@ -96,7 +96,7 @@ public class SpanAdapterTest {
assertThat(span.getDroppedAttributesCount()).isEqualTo(1);
assertThat(span.getEventsList())
.containsExactly(
Span.Event.newBuilder().setTimeUnixnano(12347).setName("my_event").build());
Span.Event.newBuilder().setTimeUnixNano(12347).setName("my_event").build());
assertThat(span.getDroppedEventsCount()).isEqualTo(2); // 3 - 1
assertThat(span.getLinksList())
.containsExactly(
@ -240,7 +240,7 @@ public class SpanAdapterTest {
Collections.<String, AttributeValue>emptyMap())))
.isEqualTo(
Span.Event.newBuilder()
.setTimeUnixnano(12345)
.setTimeUnixNano(12345)
.setName("test_without_attributes")
.build());
}
@ -257,7 +257,7 @@ public class SpanAdapterTest {
5)))
.isEqualTo(
Span.Event.newBuilder()
.setTimeUnixnano(12345)
.setTimeUnixNano(12345)
.setName("test_with_attributes")
.addAttributes(
AttributeKeyValue.newBuilder()

@ -1 +1 @@
Subproject commit 425bcf2ec82b1792498ce382054b10f3551523b2
Subproject commit 6a4eb2fa6f25569910f7b17216e3a2087496bbce