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 TypeMethodDescriptionbooleancanCreateSpanBuilder(Run<?, ?> run) io.opentelemetry.api.trace.SpanBuildercreateSpanBuilder(Run<?, ?> run, io.opentelemetry.api.trace.Tracer tracer) protected StringgetChangeRequestRootSpanName(String jobFullName) getSpanName(Run<?, ?> run) Low cardinality pipeline name that fits withCicdIncubatingAttributes.CICD_PIPELINE_NAME.intordinal()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jenkins.plugins.opentelemetry.job.runhandler.RunHandler
compareTo, configure
-
Constructor Details
-
DefaultRunHandler
public DefaultRunHandler()
-
-
Method Details
-
canCreateSpanBuilder
- Specified by:
canCreateSpanBuilderin interfaceRunHandler
-
createSpanBuilder
@NonNull public io.opentelemetry.api.trace.SpanBuilder createSpanBuilder(@NonNull Run<?, ?> run, @NonNull io.opentelemetry.api.trace.Tracer tracer) - Specified by:
createSpanBuilderin interfaceRunHandler
-
getSpanName
Description copied from interface:RunHandlerLow cardinality pipeline name that fits withCicdIncubatingAttributes.CICD_PIPELINE_NAME. High cardinality elements like the SCM pull request names of a Jenkins multibranch pipeline should be excluded from the pipeline short name.- Specified by:
getSpanNamein interfaceRunHandler
-
getChangeRequestRootSpanName
-
ordinal
public int ordinal()- Specified by:
ordinalin interfaceRunHandler- Returns:
- the ordinal of this handler to execute run handlers in predictable order. The smallest ordinal is executed first.
-