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

grpc / grpc-java / #20365

27 Jul 2026 06:04AM UTC coverage: 89.199% (+0.07%) from 89.125%
#20365

push

github

web-flow
core: Implement LB Delay Observability (Proposal A121) (#12807)

This PR implements **Attempt-Level RPC Delay Observability** across the core channel transport, built-in load balancers, xDS policies, and the OpenTelemetry telemetry plugin, aligned with [gRPC Proposal A121](https://github.com/grpc/proposal/pull/556).

38276 of 42911 relevant lines covered (89.2%)

0.89 hits per line

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

55.0
/../util/src/main/java/io/grpc/util/ForwardingClientStreamTracer.java
1
/*
2
 * Copyright 2019 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.util;
18

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

26
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2861")
27
public abstract class ForwardingClientStreamTracer extends ClientStreamTracer {
1✔
28
  /** Returns the underlying {@code ClientStreamTracer}. */
29
  protected abstract ClientStreamTracer delegate();
30

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

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

41
  @Override
42
  public void recordAttemptDelayStart(String delayType, String delayReason) {
43
    delegate().recordAttemptDelayStart(delayType, delayReason);
1✔
44
  }
1✔
45

46
  @Override
47
  public void recordAttemptDelayReasonChanged(String delayReason) {
48
    delegate().recordAttemptDelayReasonChanged(delayReason);
1✔
49
  }
1✔
50

51
  @Override
52
  public void recordAttemptDelayEnd() {
53
    delegate().recordAttemptDelayEnd();
1✔
54
  }
1✔
55

56
  @Override
57
  public void outboundHeaders() {
58
    delegate().outboundHeaders();
1✔
59
  }
1✔
60

61
  @Override
62
  public void inboundHeaders() {
63
    delegate().inboundHeaders();
1✔
64
  }
1✔
65

66
  @Override
67
  public void inboundHeaders(Metadata headers) {
68
    delegate().inboundHeaders(headers);
1✔
69
  }
1✔
70

71
  @Override
72
  public void inboundTrailers(Metadata trailers) {
73
    delegate().inboundTrailers(trailers);
1✔
74
  }
1✔
75

76
  @Override
77
  public void addOptionalLabel(String key, String value) {
78
    delegate().addOptionalLabel(key, value);
1✔
79
  }
1✔
80

81
  @Override
82
  public void streamClosed(Status status) {
83
    delegate().streamClosed(status);
×
84
  }
×
85

86
  @Override
87
  public void outboundMessage(int seqNo) {
88
    delegate().outboundMessage(seqNo);
×
89
  }
×
90

91
  @Override
92
  public void inboundMessage(int seqNo) {
93
    delegate().inboundMessage(seqNo);
×
94
  }
×
95

96
  @Override
97
  public void outboundMessageSent(int seqNo, long optionalWireSize, long optionalUncompressedSize) {
98
    delegate().outboundMessageSent(seqNo, optionalWireSize, optionalUncompressedSize);
×
99
  }
×
100

101
  @Override
102
  public void inboundMessageRead(int seqNo, long optionalWireSize, long optionalUncompressedSize) {
103
    delegate().inboundMessageRead(seqNo, optionalWireSize, optionalUncompressedSize);
×
104
  }
×
105

106
  @Override
107
  public void outboundWireSize(long bytes) {
108
    delegate().outboundWireSize(bytes);
×
109
  }
×
110

111
  @Override
112
  public void outboundUncompressedSize(long bytes) {
113
    delegate().outboundUncompressedSize(bytes);
×
114
  }
×
115

116
  @Override
117
  public void inboundWireSize(long bytes) {
118
    delegate().inboundWireSize(bytes);
×
119
  }
×
120

121
  @Override
122
  public void inboundUncompressedSize(long bytes) {
123
    delegate().inboundUncompressedSize(bytes);
×
124
  }
×
125

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

© 2026 Coveralls, Inc