• 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

70.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 recordAttemptDelayStart(String delayType, String delayReason) {
44
    delegate().recordAttemptDelayStart(delayType, delayReason);
1✔
45
  }
1✔
46

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

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

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

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

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

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

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

82
  @Override
83
  public void streamClosed(Status status) {
84
    delegate().streamClosed(status);
1✔
85
  }
1✔
86

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

92
  @Override
93
  public void inboundMessage(int seqNo) {
94
    delegate().inboundMessage(seqNo);
1✔
95
  }
1✔
96

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

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

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

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

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

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

127
  @Override
128
  public String toString() {
129
    return MoreObjects.toStringHelper(this).add("delegate", delegate()).toString();
1✔
130
  }
131
}
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