Skip to content

Commit

Permalink
fix env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
YifeiZhuang committed Sep 11, 2024
1 parent b2e6ff1 commit 93ffd4f
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Stopwatch;
import com.google.common.base.Strings;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand All @@ -34,6 +33,7 @@
import io.grpc.ManagedChannelBuilder;
import io.grpc.MetricSink;
import io.grpc.ServerBuilder;
import io.grpc.internal.GrpcUtil;
import io.grpc.opentelemetry.internal.OpenTelemetryConstants;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.api.metrics.Meter;
Expand Down Expand Up @@ -64,9 +64,8 @@ public Stopwatch get() {
};

@VisibleForTesting
static boolean ENABLE_OTEL_TRACING =
Strings.isNullOrEmpty(System.getenv("GRPC_EXPERIMENTAL_ENABLE_OTEL_TRACING"))
|| Boolean.parseBoolean(System.getenv("GRPC_EXPERIMENTAL_ENABLE_OTEL_TRACING"));
static boolean ENABLE_OTEL_TRACING = GrpcUtil.getFlag("GRPC_EXPERIMENTAL_ENABLE_OTEL_TRACING",
false);

private final OpenTelemetry openTelemetrySdk;
private final MeterProvider meterProvider;
Expand Down

0 comments on commit 93ffd4f

Please sign in to comment.