当前位置: 首页>>代码示例>>Java>>正文


Java ScopeManager类代码示例

本文整理汇总了Java中io.opentracing.ScopeManager的典型用法代码示例。如果您正苦于以下问题:Java ScopeManager类的具体用法?Java ScopeManager怎么用?Java ScopeManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ScopeManager类属于io.opentracing包,在下文中一共展示了ScopeManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: InstanaTracer

import io.opentracing.ScopeManager; //导入依赖的package包/类
/**
 * Creates a new Instana tracer with an implicit {@link ScopeManager} that is registered by the Java
 * {@link ServiceLoader}. If no scope manager is registered, this tracer will not offer support for active spans. To
 * set a scope manager explicitly, use {@link InstanaTracer#InstanaTracer(ScopeManager)}.
 */
public InstanaTracer() {
  ScopeManager scopeManager = null;
  try {
    Iterator<ScopeManager> it = ServiceLoader.load(ScopeManager.class).iterator();
    if (it.hasNext()) {
      scopeManager = it.next();
    }
  } catch (Exception ignored) {
  }
  if (scopeManager == null) {
    this.scopeManager = new InactiveScopeManager();
  } else {
    this.scopeManager = scopeManager;
  }
}
 
开发者ID:instana,项目名称:instana-java-opentracing,代码行数:21,代码来源:InstanaTracer.java

示例2: OpenTracingHystrixCallable

import io.opentracing.ScopeManager; //导入依赖的package包/类
public OpenTracingHystrixCallable(Callable<S> delegate, ScopeManager scopeManager, Span span) {
    if (span == null || delegate == null || scopeManager == null) {
        throw new NullPointerException();
    }
    this.delegateCallable = delegate;
    this.scopeManager = scopeManager;
    this.span = span;
}
 
开发者ID:OpenFeign,项目名称:feign-opentracing,代码行数:9,代码来源:TracingConcurrencyStrategy.java

示例3: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public ScopeManager scopeManager() {
    return tracer.scopeManager();
}
 
开发者ID:opentracing-contrib,项目名称:java-agent,代码行数:5,代码来源:OpenTracingHelper.java

示例4: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public ScopeManager scopeManager() {
    return null;
}
 
开发者ID:opentracing-contrib,项目名称:java-agent,代码行数:5,代码来源:DummyTracer.java

示例5: getActiveContext

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public Context<Span> getActiveContext() {
    ScopeManager scopeManager = GlobalTracer.get().scopeManager();
    return new ScopeContext(scopeManager.active(), true);
}
 
开发者ID:talsma-ict,项目名称:context-propagation,代码行数:6,代码来源:OpentracingSpanManager.java

示例6: initializeNewContext

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public Context<Span> initializeNewContext(final Span span) {
    ScopeManager scopeManager = GlobalTracer.get().scopeManager();
    return new ScopeContext(span == null ? null : scopeManager.activate(span, false), false);
}
 
开发者ID:talsma-ict,项目名称:context-propagation,代码行数:6,代码来源:OpentracingSpanManager.java

示例7: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public ScopeManager scopeManager() {
  return scopeManager;
}
 
开发者ID:instana,项目名称:instana-java-opentracing,代码行数:5,代码来源:InstanaTracer.java

示例8: InstanaSpanBuilder

import io.opentracing.ScopeManager; //导入依赖的package包/类
InstanaSpanBuilder(ScopeManager scopeManager, String operationName) {
  this.scopeManager = scopeManager;
  this.operationName = operationName;
  tags = new HashMap<String, String>();
}
 
开发者ID:instana,项目名称:instana-java-opentracing,代码行数:6,代码来源:InstanaSpanBuilder.java

示例9: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override public ScopeManager scopeManager() {
  return scopeManager;
}
 
开发者ID:openzipkin-contrib,项目名称:brave-opentracing,代码行数:4,代码来源:BraveTracer.java

示例10: MockTracer

import io.opentracing.ScopeManager; //导入依赖的package包/类
public MockTracer(ScopeManager scopeManager) {
    this(scopeManager, Propagator.TEXT_MAP);
}
 
开发者ID:opentracing,项目名称:opentracing-java,代码行数:4,代码来源:MockTracer.java

示例11: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public ScopeManager scopeManager() {
    return this.scopeManager;
}
 
开发者ID:opentracing,项目名称:opentracing-java,代码行数:5,代码来源:MockTracer.java

示例12: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public ScopeManager scopeManager() {
    return NoopScopeManager.INSTANCE;
}
 
开发者ID:opentracing,项目名称:opentracing-java,代码行数:5,代码来源:NoopTracer.java

示例13: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public ScopeManager scopeManager() {
	return delegate.scopeManager();
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:5,代码来源:SpanWrappingTracer.java

示例14: scopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
@Override
public ScopeManager scopeManager() {
	return scopeManager;
}
 
开发者ID:stagemonitor,项目名称:stagemonitor,代码行数:5,代码来源:DefaultTracerImpl.java

示例15: activeScopeManager

import io.opentracing.ScopeManager; //导入依赖的package包/类
/**
 * By default, this builder uses BraveActiveSpanSource, which delegates management of the active
 * span to Brave and acts as a simple wrapper. You can override with any other implementation,
 * but beware that some implementations, e.g. opentracing-util's ThreadLocalActiveSpanSource,
 * may not tell Brave about the active span. In these scenarios, you would need to use the
 * OpenTracing APIs exclusively, as the Brave APIs would not function correctly, if at all.
 */
public Builder activeScopeManager(ScopeManager scopeManager) {
  if (scopeManager == null) throw new NullPointerException("scopeManager == null");
  this.scopeManager = scopeManager;
  return this;
}
 
开发者ID:openzipkin-contrib,项目名称:brave-opentracing,代码行数:13,代码来源:BraveTracer.java


注:本文中的io.opentracing.ScopeManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。