All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.instrumentation.spring.web.v3_1.internal.WebTelemetryUtil Maven / Gradle / Ivy

There is a newer version: 2.8.0-alpha
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.instrumentation.spring.web.v3_1.internal;

import io.opentelemetry.instrumentation.api.incubator.builder.internal.DefaultHttpClientInstrumenterBuilder;
import io.opentelemetry.instrumentation.spring.web.v3_1.SpringWebTelemetryBuilder;
import java.util.function.Function;
import org.springframework.http.HttpRequest;
import org.springframework.http.client.ClientHttpResponse;

/**
 * This class is internal and is hence not for public use. Its APIs are unstable and can change at
 * any time.
 */
public class WebTelemetryUtil {
  private WebTelemetryUtil() {}

  // allows access to the private field for the spring starter
  private static Function<
          SpringWebTelemetryBuilder,
          DefaultHttpClientInstrumenterBuilder>
      builderExtractor;

  public static Function<
          SpringWebTelemetryBuilder,
          DefaultHttpClientInstrumenterBuilder>
      getBuilderExtractor() {
    return builderExtractor;
  }

  public static void setBuilderExtractor(
      Function<
              SpringWebTelemetryBuilder,
              DefaultHttpClientInstrumenterBuilder>
          builderExtractor) {
    WebTelemetryUtil.builderExtractor = builderExtractor;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy