Class MonitoringPipelineListener
java.lang.Object
io.jenkins.plugins.opentelemetry.job.jenkins.AbstractPipelineListener
io.jenkins.plugins.opentelemetry.job.MonitoringPipelineListener
- All Implemented Interfaces:
ExtensionPoint
,io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener
,PipelineListener
,Comparable<io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener>
,org.jenkinsci.plugins.workflow.flow.StepListener
@Extension(dynamicLoadable=YES,
optional=true)
public class MonitoringPipelineListener
extends AbstractPipelineListener
implements PipelineListener, org.jenkinsci.plugins.workflow.flow.StepListener, io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<StepHandler>
io.opentelemetry.api.trace.Tracer
void
notifyOfNewStep
(org.jenkinsci.plugins.workflow.steps.Step step, org.jenkinsci.plugins.workflow.steps.StepContext context) void
onAfterAtomicStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode node, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just after the atomic stepvoid
onAfterStartNodeStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String nodeLabel, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just after the `node` step starts.void
onAtomicStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode node, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the atomic step startsvoid
onEndNodeStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, String nodeName, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just after the `node` step endsvoid
onEndParallelStepBranch
(org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, String branchName, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `parallel` branch endsvoid
onEndStageStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, String stageName, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just after the `stage` step endsvoid
onEndWithNewSpanStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `withNewSpan` step endsvoid
onStartNodeStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String agentLabel, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `node` step starts.void
onStartParallelStepBranch
(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String branchName, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `parallel` branch startsvoid
onStartStageStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String stageName, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `stage`step startsvoid
onStartWithNewSpanStep
(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `withNewSpan` step startsvoid
final void
setOpenTelemetryTracerService
(OtelTraceService otelTraceService) protected io.opentelemetry.context.Scope
setupContext
(org.jenkinsci.plugins.workflow.job.WorkflowRun run, org.jenkinsci.plugins.workflow.graph.FlowNode node) toString()
Methods inherited from class io.jenkins.plugins.opentelemetry.job.jenkins.AbstractPipelineListener
onEndPipeline, onStartPipeline
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener
afterConfiguration, compareTo, ordinal
Methods inherited from interface io.jenkins.plugins.opentelemetry.job.jenkins.PipelineListener
onEndPipeline, onStartPipeline
-
Field Details
-
jenkinsControllerOpenTelemetry
-
-
Constructor Details
-
MonitoringPipelineListener
public MonitoringPipelineListener()
-
-
Method Details
-
postConstruct
@PostConstruct public void postConstruct() -
onStartNodeStep
public void onStartNodeStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, @Nullable String agentLabel, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just before the `node` step starts.- Specified by:
onStartNodeStep
in interfacePipelineListener
- Overrides:
onStartNodeStep
in classAbstractPipelineListener
-
onAfterStartNodeStep
public void onAfterStartNodeStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, @Nullable String nodeLabel, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just after the `node` step starts.- Specified by:
onAfterStartNodeStep
in interfacePipelineListener
- Overrides:
onAfterStartNodeStep
in classAbstractPipelineListener
-
onStartStageStep
public void onStartStageStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, @NonNull String stageName, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just before the `stage`step starts- Specified by:
onStartStageStep
in interfacePipelineListener
- Overrides:
onStartStageStep
in classAbstractPipelineListener
-
onEndNodeStep
public void onEndNodeStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, @NonNull String nodeName, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just after the `node` step ends- Specified by:
onEndNodeStep
in interfacePipelineListener
- Overrides:
onEndNodeStep
in classAbstractPipelineListener
-
onEndStageStep
public void onEndStageStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, @NonNull String stageName, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just after the `stage` step ends- Specified by:
onEndStageStep
in interfacePipelineListener
- Overrides:
onEndStageStep
in classAbstractPipelineListener
-
getStepHandlers
-
onAtomicStep
public void onAtomicStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode node, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just before the atomic step starts- Specified by:
onAtomicStep
in interfacePipelineListener
- Overrides:
onAtomicStep
in classAbstractPipelineListener
-
onAfterAtomicStep
public void onAfterAtomicStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode node, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just after the atomic step- Specified by:
onAfterAtomicStep
in interfacePipelineListener
- Overrides:
onAfterAtomicStep
in classAbstractPipelineListener
-
onStartParallelStepBranch
public void onStartParallelStepBranch(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, @NonNull String branchName, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just before the `parallel` branch starts- Specified by:
onStartParallelStepBranch
in interfacePipelineListener
- Overrides:
onStartParallelStepBranch
in classAbstractPipelineListener
-
onEndParallelStepBranch
public void onEndParallelStepBranch(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, @NonNull String branchName, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just before the `parallel` branch ends- Specified by:
onEndParallelStepBranch
in interfacePipelineListener
- Overrides:
onEndParallelStepBranch
in classAbstractPipelineListener
-
onStartWithNewSpanStep
public void onStartWithNewSpanStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just before the `withNewSpan` step starts- Specified by:
onStartWithNewSpanStep
in interfacePipelineListener
- Overrides:
onStartWithNewSpanStep
in classAbstractPipelineListener
-
onEndWithNewSpanStep
public void onEndWithNewSpanStep(@NonNull org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode node, org.jenkinsci.plugins.workflow.graph.FlowNode nextNode, @NonNull org.jenkinsci.plugins.workflow.job.WorkflowRun run) Description copied from interface:PipelineListener
Just before the `withNewSpan` step ends- Specified by:
onEndWithNewSpanStep
in interfacePipelineListener
- Overrides:
onEndWithNewSpanStep
in classAbstractPipelineListener
-
notifyOfNewStep
public void notifyOfNewStep(@NonNull org.jenkinsci.plugins.workflow.steps.Step step, @NonNull org.jenkinsci.plugins.workflow.steps.StepContext context) - Specified by:
notifyOfNewStep
in interfaceorg.jenkinsci.plugins.workflow.flow.StepListener
-
setupContext
@NonNull @MustBeClosed protected io.opentelemetry.context.Scope setupContext(org.jenkinsci.plugins.workflow.job.WorkflowRun run, @NonNull org.jenkinsci.plugins.workflow.graph.FlowNode node) - Returns:
null
if noSpan
has been created for theRun
of the givenFlowNode
-
setOpenTelemetryTracerService
-
getTracerService
-
getTracer
@NonNull public io.opentelemetry.api.trace.Tracer getTracer() -
toString
-