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

io.opentelemetry.sdk.trace.export.NoopSpanExporter Maven / Gradle / Ivy

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

package io.opentelemetry.sdk.trace.export;

import io.opentelemetry.sdk.common.CompletableResultCode;
import io.opentelemetry.sdk.trace.data.SpanData;
import java.util.Collection;

final class NoopSpanExporter implements SpanExporter {

  private static final SpanExporter INSTANCE = new NoopSpanExporter();

  static SpanExporter getInstance() {
    return INSTANCE;
  }

  @Override
  public CompletableResultCode export(Collection spans) {
    return CompletableResultCode.ofSuccess();
  }

  @Override
  public CompletableResultCode flush() {
    return CompletableResultCode.ofSuccess();
  }

  @Override
  public CompletableResultCode shutdown() {
    return CompletableResultCode.ofSuccess();
  }

  @Override
  public String toString() {
    return "NoopSpanExporter{}";
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy