com.aliyun.openservices.shade.io.opentelemetry.context.ContextStorageProvider Maven / Gradle / Ivy
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package com.aliyun.openservices.shade.com.aliyun.openservices.shade.io.opentelemetry.context;
import java.util.concurrent.Executor;
/**
* A Java SPI (Service Provider Interface) to allow replacing the default {@link ContextStorage}.
* This can be useful if, for example, you want to store OpenTelemetry {@link Context} in another
* context propagation system. For example, the returned {@link ContextStorage} could delegate to
* methods in
*
* {@code
* com.linecorp.armeria.common.RequestContext}, {@code
* io.grpc.context.Context}, or {@code
* org.eclipse.microprofile.context.ThreadContext}
*
*
if you are already using one of those systems in your application. Then you would not have to
* use methods like {@link Context#wrap(Executor)} and can use your current system instead.
*/
public interface ContextStorageProvider {
/** Returns the {@link ContextStorage} to use to store {@link Context}. */
ContextStorage get();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy