congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Span$Builder.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.nike.wingtips.Span$Builder
constructor

Best Java code snippets using com.nike.wingtips.Span$Builder.<init> (Showing top 2 results out of 315)

origin: Nike-Inc/wingtips

/**
 * @return A new span builder that has all its fields copied from the given {@link Span}. If you call {@link Builder#build()} immediately on the returned builder you'd
 *          end up with an exact duplicate of the given span.
 */
public static Builder newBuilder(Span copy) {
  Builder builder = new Builder(copy.spanName, copy.spanPurpose);
  builder.traceId = copy.traceId;
  builder.spanId = copy.spanId;
  builder.parentSpanId = copy.parentSpanId;
  builder.sampleable = copy.sampleable;
  builder.userId = copy.userId;
  builder.spanStartTimeEpochMicros = copy.spanStartTimeEpochMicros;
  builder.spanStartTimeNanos = copy.spanStartTimeNanos;
  builder.durationNanos = copy.durationNanos;
  builder.tags = new LinkedHashMap<>(copy.tags);
  builder.annotations = new ArrayList<>(copy.annotations);
  return builder;
}
origin: Nike-Inc/wingtips

/**
 * @param spanName The {@link Span#getSpanName()} to initialize the builder with.
 * @param spanPurpose The {@link SpanPurpose} to initialize the builder with. See the javadocs for {@link SpanPurpose} for full details on what each enum
 *                    option means. If you pass in null for this then {@link SpanPurpose#UNKNOWN} will be used.
 * @return A new span builder with nothing populated beyond the given span name. Based on the behavior of {@link Builder#build()}, if you were to build it
 *          immediately you'd end up with an uncompleted root span for a new trace (same behavior as {@link #generateRootSpanForNewTrace(String, SpanPurpose)}.
 *          You are free to adjust any values before building however, so you can setup the builder to represent any span you want.
 */
public static Builder newBuilder(String spanName, SpanPurpose spanPurpose) {
  return new Builder(spanName, spanPurpose);
}
com.nike.wingtipsSpan$Builder<init>

Popular methods of Span$Builder

  • build
    Returns a Span built from the parameters set via the various with*(...) methods on this builder inst
  • withParentSpanId
    Sets the ID of the span that spawned this span instance (the logical "parent" of this span), or pass
  • withSampleable
    Set this to true if this span is sampleable and should be output to the logging/span collection syst
  • withUserId
    Sets the ID of the user logically associated with this span, or pass in null if no such user ID exis
  • withTraceId
    Sets the The ID associated with the overall distributed trace - a.k.a. the trace tree ID. All spans
  • withDurationNanos
    Sets the duration of the span in nanoseconds, or null if this Span should not be considered Span#is
  • withSpanId
    Sets the ID for this span of work in the distributed trace. Don't confuse this with #withTraceId(Str
  • withSpanStartTimeEpochMicros
    Sets the start timestamp in microseconds since the epoch for this span (*not* milliseconds), or pas
  • withSpanStartTimeNanos
    TLDR; Passing in null (or not calling this method at all) is always a safe option - when in doubt le
  • withSpanName
    Sets the human-readable name for this span. This should never be null - if you set this to null and
  • withSpanPurpose
    Sets the SpanPurpose for this span. See the javadocs on that class for details on what each enum opt
  • withTag
    Sets the value of a tag for the respective key. This will replace an existing tag value for the resp
  • withSpanPurpose,
  • withTag,
  • withTags,
  • withTimestampedAnnotation,
  • withTimestampedAnnotations

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JFrame (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • 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