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

io.opentelemetry.exporter.sender.okhttp.internal.OkHttpGrpcSenderProvider Maven / Gradle / Ivy

The newest version!
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.exporter.sender.okhttp.internal;

import io.grpc.Channel;
import io.opentelemetry.exporter.internal.compression.Compressor;
import io.opentelemetry.exporter.internal.grpc.GrpcSender;
import io.opentelemetry.exporter.internal.grpc.GrpcSenderProvider;
import io.opentelemetry.exporter.internal.grpc.MarshalerServiceStub;
import io.opentelemetry.exporter.internal.marshal.Marshaler;
import io.opentelemetry.sdk.common.export.RetryPolicy;
import java.net.URI;
import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.function.Supplier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.X509TrustManager;
import org.jetbrains.annotations.Nullable;

/**
 * {@link GrpcSender} SPI implementation for {@link OkHttpGrpcSender}.
 *
 * 

This class is internal and is hence not for public use. Its APIs are unstable and can change * at any time. */ public class OkHttpGrpcSenderProvider implements GrpcSenderProvider { @Override public GrpcSender createSender( URI endpoint, String endpointPath, @Nullable Compressor compressor, long timeoutNanos, long connectTimeoutNanos, Supplier>> headersSupplier, @Nullable Object managedChannel, Supplier>> stubFactory, @Nullable RetryPolicy retryPolicy, @Nullable SSLContext sslContext, @Nullable X509TrustManager trustManager) { return new OkHttpGrpcSender<>( endpoint.resolve(endpointPath).toString(), compressor, timeoutNanos, connectTimeoutNanos, headersSupplier, retryPolicy, sslContext, trustManager); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy