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

io.opentelemetry.exporter.zipkin.internal.ZipkinSpanExporterProvider Maven / Gradle / Ivy

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

package io.opentelemetry.exporter.zipkin.internal;

import io.opentelemetry.exporter.zipkin.ZipkinSpanExporter;
import io.opentelemetry.exporter.zipkin.ZipkinSpanExporterBuilder;
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
import io.opentelemetry.sdk.autoconfigure.spi.traces.ConfigurableSpanExporterProvider;
import io.opentelemetry.sdk.trace.export.SpanExporter;
import java.time.Duration;

/**
 * {@link SpanExporter} SPI implementation for {@link ZipkinSpanExporter}.
 *
 * 

This class is internal and is hence not for public use. Its APIs are unstable and can change * at any time. */ public class ZipkinSpanExporterProvider implements ConfigurableSpanExporterProvider { @Override public String getName() { return "zipkin"; } @Override public SpanExporter createExporter(ConfigProperties config) { ZipkinSpanExporterBuilder builder = ZipkinSpanExporter.builder(); String endpoint = config.getString("otel.exporter.zipkin.endpoint"); if (endpoint != null) { builder.setEndpoint(endpoint); } Duration timeout = config.getDuration("otel.exporter.zipkin.timeout"); if (timeout != null) { builder.setReadTimeout(timeout); } return builder.build(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy