Tabnine Logo
Span.getBegin
Code IndexAdd Tabnine to your IDE (free)

How to use
getBegin
method
in
org.springframework.cloud.sleuth.Span

Best Java code snippets using org.springframework.cloud.sleuth.Span.getBegin (Showing top 3 results out of 315)

origin: census-instrumentation/opencensus-java

private static Span sampledSpan(Span span, Sampler sampler) {
 if (!sampler.isSampled(span)) {
  // Copy everything, except set exportable to false
  return Span.builder()
    .begin(span.getBegin())
    .traceIdHigh(span.getTraceIdHigh())
    .traceId(span.getTraceId())
    .spanId(span.getSpanId())
    .name(span.getName())
    .exportable(false)
    .build();
 }
 return span;
}
origin: org.springframework.cloud/spring-cloud-sleuth-zipkin2

zipkinSpan.timestamp(convertedSpan.getBegin() * 1000L);
if (!convertedSpan.isRunning()) { // duration is authoritative, only write when the span stopped
  zipkinSpan.duration(calculateDurationInMicros(convertedSpan));
origin: org.springframework.cloud/spring-cloud-gcp-trace

private void writeStartEndTime(Span span, TraceSpan.Builder builder) {
  if (!span.isRemote()) {
    Log clientSend = findLog(span, Span.CLIENT_SEND);
    Log clientReceive = findLog(span, Span.CLIENT_RECV);
    if (clientSend != null) {
      builder.setStartTime(createTimestamp(clientSend.getTimestamp()));
    }
    else {
      builder.setStartTime(createTimestamp(span.getBegin()));
    }
    if (!span.isRunning()) {
      if (clientReceive != null) {
        builder.setEndTime(createTimestamp(clientReceive.getTimestamp()));
      }
      else {
        builder.setEndTime(createTimestamp(span.getEnd()));
      }
    }
  }
}
org.springframework.cloud.sleuthSpangetBegin

Popular methods of Span

  • getSpanId
  • getParents
  • getName
  • getTraceId
  • isExportable
  • builder
  • getProcessId
  • getSavedSpan
  • tag
  • traceIdString
  • hexToId
  • idToHex
  • hexToId,
  • idToHex,
  • isRemote,
  • logEvent,
  • tags,
  • getTraceIdHigh,
  • isRunning,
  • logs,
  • stop

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now