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

io.opentelemetry.sdk.trace.NoopSpanProcessor 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.sdk.trace;

import io.opentelemetry.context.Context;

final class NoopSpanProcessor implements SpanProcessor {
  private static final NoopSpanProcessor INSTANCE = new NoopSpanProcessor();

  static SpanProcessor getInstance() {
    return INSTANCE;
  }

  @Override
  public void onStart(Context parentContext, ReadWriteSpan span) {}

  @Override
  public boolean isStartRequired() {
    return false;
  }

  @Override
  public void onEnd(ReadableSpan span) {}

  @Override
  public boolean isEndRequired() {
    return false;
  }

  private NoopSpanProcessor() {}

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy