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

grpc / grpc-java / #19459

16 Sep 2024 09:43PM UTC coverage: 84.566% (+0.01%) from 84.555%
#19459

push

github

web-flow
Otel server context interceptor (#11500)

Add opentelemetry tracing API, guarded by environmental variable(disabled by default).
Use server interceptor to explicitly propagate span to the application thread.

33627 of 39764 relevant lines covered (84.57%)

0.85 hits per line

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

50.0
/../opentelemetry/src/main/java/io/grpc/opentelemetry/InternalGrpcOpenTelemetry.java
1
/*
2
 * Copyright 2024 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.opentelemetry;
18

19
import io.grpc.Internal;
20

21
/**
22
 * Internal accessor for {@link GrpcOpenTelemetry}.
23
 */
24
@Internal
25
public final class InternalGrpcOpenTelemetry {
26
  private InternalGrpcOpenTelemetry() {}
27

28
  public static void builderPlugin(
29
      GrpcOpenTelemetry.Builder builder, InternalOpenTelemetryPlugin plugin) {
30
    builder.plugin(plugin);
1✔
31
  }
1✔
32

33
  public static void enableTracing(GrpcOpenTelemetry.Builder builder, boolean enable) {
34
    builder.enableTracing(enable);
×
35
  }
×
36
}
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