private String getName(URI uri) { // The returned name should comply with RFC 882 - Section 3.1.2. // i.e Header values must composed of printable ASCII values. return SpanNameUtil.shorten(uriScheme(uri) + ":" + uri.getRawPath()); }
public static String toLowerHyphen(String name) { StringBuilder result = new StringBuilder(); for (int i = 0; i < name.length(); i++) { char c = name.charAt(i); if (Character.isUpperCase(c)) { if (i != 0) { result.append('-'); } result.append(Character.toLowerCase(c)); } else { result.append(c); } } return SpanNameUtil.shorten(result.toString()); }
private String messageChannelName(MessageChannel channel) { return SpanNameUtil.shorten(channelName(channel)); }
private String getName(URI uri) { // The returned name should comply with RFC 882 - Section 3.1.2. // i.e Header values must composed of printable ASCII values. return SpanNameUtil.shorten(uriScheme(uri) + ":" + uri.getRawPath()); }
public static String toLowerHyphen(String name) { StringBuilder result = new StringBuilder(); for (int i = 0; i < name.length(); i++) { char c = name.charAt(i); if (Character.isUpperCase(c)) { if (i != 0) { result.append('-'); } result.append(Character.toLowerCase(c)); } else { result.append(c); } } return SpanNameUtil.shorten(result.toString()); }
private String messageChannelName(MessageChannel channel) { return SpanNameUtil.shorten(channelName(channel)); }
@Override @javax.annotation.Nullable public Span createSpan(String name, /*@Nullable*/ Sampler sampler) { String shortenedName = SpanNameUtil.shorten(name); Span span; if (isTracing()) { span = createChild(getCurrentSpan(), shortenedName); } else { long id = createId(); span = Span.builder() .name(shortenedName) .traceIdHigh(this.traceId128 ? createTraceIdHigh() : 0L) .traceId(id) .spanId(id) .build(); if (sampler == null) { sampler = this.defaultSampler; } span = sampledSpan(span, sampler); this.spanLogger.logStartedSpan(null, span); } return continueSpan(span); }
String shortenedName = SpanNameUtil.shorten(name); long id = createId(); if (parent == null) {