• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grpc / grpc-java / #19180

29 Apr 2024 11:30PM UTC coverage: 88.296% (-0.06%) from 88.351%
#19180

push

github

web-flow
Plumb optional labels from LB to ClientStreamTracer

As part of gRFC A78:

> To support the locality label in the per-call metrics, we will provide
> a mechanism for LB picker to add optional labels to the call attempt
> tracer.

31435 of 35602 relevant lines covered (88.3%)

0.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/../core/src/main/java/io/grpc/internal/ForwardingClientStreamTracer.java
1
/*
2
 * Copyright 2021 The gRPC Authors
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package io.grpc.internal;
18

19
import com.google.common.base.MoreObjects;
20
import io.grpc.Attributes;
21
import io.grpc.ClientStreamTracer;
22
import io.grpc.Metadata;
23
import io.grpc.Status;
24

25
public abstract class ForwardingClientStreamTracer extends ClientStreamTracer {
1✔
26

27
  /**
28
   * Returns the underlying {@code ClientStreamTracer}.
29
   */
30
  protected abstract ClientStreamTracer delegate();
31

32
  @Override
33
  public void streamCreated(Attributes transportAttrs, Metadata headers) {
34
    delegate().streamCreated(transportAttrs, headers);
1✔
35
  }
1✔
36

37
  @Override
38
  public void createPendingStream() {
39
    delegate().createPendingStream();
1✔
40
  }
1✔
41

42
  @Override
43
  public void outboundHeaders() {
44
    delegate().outboundHeaders();
1✔
45
  }
1✔
46

47
  @Override
48
  public void inboundHeaders() {
49
    delegate().inboundHeaders();
1✔
50
  }
1✔
51

52
  @Override
53
  public void inboundTrailers(Metadata trailers) {
54
    delegate().inboundTrailers(trailers);
1✔
55
  }
1✔
56

57
  @Override
58
  public void addOptionalLabel(String key, String value) {
59
    delegate().addOptionalLabel(key, value);
1✔
60
  }
1✔
61

62
  @Override
63
  public void streamClosed(Status status) {
64
    delegate().streamClosed(status);
1✔
65
  }
1✔
66

67
  @Override
68
  public void outboundMessage(int seqNo) {
69
    delegate().outboundMessage(seqNo);
×
70
  }
×
71

72
  @Override
73
  public void inboundMessage(int seqNo) {
74
    delegate().inboundMessage(seqNo);
×
75
  }
×
76

77
  @Override
78
  public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) {
79
    delegate().outboundMessageSent(seqNo, optionalWireSize, optionalUncompressedSize);
×
80
  }
×
81

82
  @Override
83
  public void inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize) {
84
    delegate().inboundMessageRead(seqNo, optionalWireSize, optionalUncompressedSize);
×
85
  }
×
86

87
  @Override
88
  public void outboundWireSize(long bytes) {
89
    delegate().outboundWireSize(bytes);
×
90
  }
×
91

92
  @Override
93
  public void outboundUncompressedSize(long bytes) {
94
    delegate().outboundUncompressedSize(bytes);
×
95
  }
×
96

97
  @Override
98
  public void inboundWireSize(long bytes) {
99
    delegate().inboundWireSize(bytes);
×
100
  }
×
101

102
  @Override
103
  public void inboundUncompressedSize(long bytes) {
104
    delegate().inboundUncompressedSize(bytes);
×
105
  }
×
106

107
  @Override
108
  public String toString() {
109
    return MoreObjects.toStringHelper(this).add("delegate", delegate()).toString();
1✔
110
  }
111
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc