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


Java Span类代码示例

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


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

示例1: zrevrangeByLex

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Set<String> zrevrangeByLex(String key, String max, String min, int offset, int count) {
  Span span = helper.buildSpan("zrevrangeByLex", key);
  span.setTag("min", min);
  span.setTag("max", max);
  span.setTag("offset", offset);
  span.setTag("count", count);
  try {
    return super.zrevrangeByLex(key, max, min, offset, count);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:17,代码来源:TracingJedis.java

示例2: georadiusByMember

import io.opentracing.Span; //导入依赖的package包/类
@Override
public List<GeoRadiusResponse> georadiusByMember(String key, String member, double radius,
    GeoUnit unit, GeoRadiusParam param) {
  Span span = helper.buildSpan("georadiusByMember", key);
  span.setTag("member", member);
  span.setTag("radius", radius);
  span.setTag("unit", unit.name());
  span.setTag("param", TracingHelper.toString(param.getByteParams()));
  try {
    return super.georadiusByMember(key, member, radius, unit, param);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:18,代码来源:TracingJedisCluster.java

示例3: zrevrangeByScoreWithScores

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min, int offset,
    int count) {
  Span span = helper.buildSpan("zrevrangeByScoreWithScores", key);
  span.setTag("min", min);
  span.setTag("max", max);
  span.setTag("offset", offset);
  span.setTag("count", count);
  try {
    return super.zrevrangeByScoreWithScores(key, max, min, offset, count);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:18,代码来源:TracingJedisCluster.java

示例4: pfadd

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Long pfadd(K key, V... values) {
  Span span = helper.buildSpan("pfadd", key);
  try {
    return commands.pfadd(key, values);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:13,代码来源:TracingRedisCommands.java

示例5: del

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Long del(String key) {
  Span span = helper.buildSpan("del", key);
  try {
    return super.del(key);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:13,代码来源:TracingJedisCluster.java

示例6: brpop

import io.opentracing.Span; //导入依赖的package包/类
@Override
public List<String> brpop(int timeout, String... keys) {
  Span span = helper.buildSpan("brpop", keys);
  span.setTag("timeout", timeout);
  try {
    return super.brpop(timeout, keys);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:14,代码来源:TracingJedis.java

示例7: bitpos

import io.opentracing.Span; //导入依赖的package包/类
@Override
public RedisFuture<Long> bitpos(K key, boolean state, long start) {
  Span span = helper.buildSpan("bitpos", key);
  span.setTag("state", state);
  span.setTag("start", start);
  return setCompleteAction(commands.bitpos(key, state, start), span);
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:8,代码来源:TracingRedisAsyncCommands.java

示例8: bitpos

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Long bitpos(byte[] key, boolean value) {
  Span span = helper.buildSpan("bitpos", key);
  span.setTag("value", value);
  try {
    return super.bitpos(key, value);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:14,代码来源:TracingJedis.java

示例9: sdiff

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Set<String> sdiff(String... keys) {
  Span span = helper.buildSpan("sdiff", keys);
  try {
    return super.sdiff(keys);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:13,代码来源:TracingJedis.java

示例10: type

import io.opentracing.Span; //导入依赖的package包/类
@Override
public String type(String key) {
  Span span = helper.buildSpan("type", key);
  try {
    return super.type(key);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:13,代码来源:TracingJedisCluster.java

示例11: slowlogLen

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Long slowlogLen() {
  Span span = helper.buildSpan("slowlogLen");
  try {
    return super.slowlogLen();
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:13,代码来源:TracingJedis.java

示例12: geoadd

import io.opentracing.Span; //导入依赖的package包/类
@Override
public Long geoadd(String key, Map<String, GeoCoordinate> memberCoordinateMap) {
  Span span = helper.buildSpan("geoadd");
  span.setTag("memberCoordinateMap", TracingHelper.toString(memberCoordinateMap));
  try {
    return super.geoadd(key, memberCoordinateMap);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:14,代码来源:TracingJedisCluster.java

示例13: zrevrangebyscore

import io.opentracing.Span; //导入依赖的package包/类
@Override
public RedisFuture<List<V>> zrevrangebyscore(K key,
    Range<? extends Number> range) {
  Span span = helper.buildSpan("zrevrangebyscore", key);
  span.setTag("range", nullable(range));
  return setCompleteAction(commands.zrevrangebyscore(key, range), span);
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:8,代码来源:TracingRedisAsyncCommands.java

示例14: clientSetname

import io.opentracing.Span; //导入依赖的package包/类
@Override
public String clientSetname(String name) {
  Span span = helper.buildSpan("clientSetname");
  span.setTag("name", name);
  try {
    return super.clientSetname(name);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:14,代码来源:TracingJedis.java

示例15: sscan

import io.opentracing.Span; //导入依赖的package包/类
@Override
public ScanResult<String> sscan(String key, String cursor, ScanParams params) {
  Span span = helper.buildSpan("sscan", key);
  span.setTag("cursor", cursor);
  span.setTag("params", TracingHelper.toString(params.getParams()));
  try {
    return super.sscan(key, cursor, params);
  } catch (Exception e) {
    onError(e, span);
    throw e;
  } finally {
    span.finish();
  }
}
 
开发者ID:opentracing-contrib,项目名称:java-redis-client,代码行数:15,代码来源:TracingJedisCluster.java


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