Class DefaultRunHandler
java.lang.Object
io.jenkins.plugins.opentelemetry.job.runhandler.DefaultRunHandler
- All Implemented Interfaces:
RunHandler
,Comparable<RunHandler>
Use same root span name for all pull change request pipelines (pull request, merge request)
Use different span names for different branches.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canCreateSpanBuilder
(Run<?, ?> run) io.opentelemetry.api.trace.SpanBuilder
createSpanBuilder
(Run<?, ?> run, io.opentelemetry.api.trace.Tracer tracer) protected String
getChangeRequestRootSpanName
(String jobFullName) int
ordinal()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.jenkins.plugins.opentelemetry.job.runhandler.RunHandler
compareTo, configure
-
Constructor Details
-
DefaultRunHandler
public DefaultRunHandler()
-
-
Method Details
-
canCreateSpanBuilder
- Specified by:
canCreateSpanBuilder
in interfaceRunHandler
-
createSpanBuilder
@NonNull public io.opentelemetry.api.trace.SpanBuilder createSpanBuilder(@NonNull Run<?, ?> run, @NonNull io.opentelemetry.api.trace.Tracer tracer) - Specified by:
createSpanBuilder
in interfaceRunHandler
-
getChangeRequestRootSpanName
-
ordinal
public int ordinal()- Specified by:
ordinal
in interfaceRunHandler
- Returns:
- the ordinal of this handler to execute run handlers in predictable order. The smallest ordinal is executed first.
-