-
public final class SpanOptionsOptional configuration used when starting a new
Span.SpanOptionsare immutable and shareable, but internally track which options have been overridden. As such not setting a value will cause its default to be used (example: not setting startTime will causeSystemClock.elapsedRealtimeNanosto be used).New
SpanOptionsare typically based on the DEFAULTS:BugsnagPerformance.startSpan("LoadSuggestions", SpanOptions.startTime(actualStartTime))
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSpanOptions.Companion
-
Field Summary
Fields Modifier and Type Field Description private final LongstartTimeprivate final BooleanisFirstClassprivate final SpanContextparentContextprivate final BooleaninstrumentRenderingprivate final SpanMetricsspanMetricsprivate final BooleanmakeContext
-
Method Summary
Modifier and Type Method Description final LonggetStartTime()final BooleangetIsFirstClass()final SpanContextgetParentContext()final BooleangetInstrumentRendering()final SpanMetricsgetSpanMetrics()final BooleangetMakeContext()final SpanOptionsstartTime(Long startTime)Override the start time of new Spans created with theseSpanOptions.final SpanOptionswithin(SpanContext parentContext)final SpanOptionsmakeCurrentContext(Boolean makeContext)final SpanOptionssetFirstClass(Boolean isFirstClass)final SpanOptionswithRenderingMetrics(Boolean instrumentRendering)final SpanOptionswithMetrics(SpanMetrics spanMetrics)Set the metrics that should be captured with the spans. final SpanOptionswithMetrics()Set the metrics that should be captured with the spans. Booleanequals(Object other)IntegerhashCode()StringtoString()-
-
Method Detail
-
getStartTime
final Long getStartTime()
-
getIsFirstClass
final Boolean getIsFirstClass()
-
getParentContext
final SpanContext getParentContext()
-
getInstrumentRendering
final Boolean getInstrumentRendering()
-
getSpanMetrics
final SpanMetrics getSpanMetrics()
-
getMakeContext
final Boolean getMakeContext()
-
startTime
final SpanOptions startTime(Long startTime)
Override the start time of new
Spans created with theseSpanOptions. This is useful when the start time is reported from an external system.- Parameters:
startTime- the start time to report relative to SystemClock.elapsedRealtimeNanos
-
within
final SpanOptions within(SpanContext parentContext)
-
makeCurrentContext
final SpanOptions makeCurrentContext(Boolean makeContext)
-
setFirstClass
final SpanOptions setFirstClass(Boolean isFirstClass)
-
withRenderingMetrics
@Deprecated(message = use spanMetrics.rendering, replaceWith = @ReplaceWith(imports = {com.bugsnag.android.performance.SpanMetrics}, expression = withMetrics(SpanMetrics(rendering = instrumentRendering)))) final SpanOptions withRenderingMetrics(Boolean instrumentRendering)
-
withMetrics
@JvmOverloads() final SpanOptions withMetrics(SpanMetrics spanMetrics)
Set the metrics that should be captured with the spans. Adding metrics that have been disabled via PerformanceConfiguration.enabledMetrics will have no effect (as they are not being captured). Calling this with an explicit
null(withMetrics(null)) will capture only the default metrics for the span (see SpanMetrics for more details).
-
withMetrics
@JvmOverloads() final SpanOptions withMetrics()
Set the metrics that should be captured with the spans. Adding metrics that have been disabled via PerformanceConfiguration.enabledMetrics will have no effect (as they are not being captured). Calling this with an explicit
null(withMetrics(null)) will capture only the default metrics for the span (see SpanMetrics for more details).
-
-
-
-