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 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.TracervoidnotifyOfNewStep(org.jenkinsci.plugins.workflow.steps.Step step, org.jenkinsci.plugins.workflow.steps.StepContext context) voidonAfterAtomicStep(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 stepvoidonAfterStartNodeStep(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String nodeLabel, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just after the `node` step starts.voidonAtomicStep(org.jenkinsci.plugins.workflow.cps.nodes.StepAtomNode node, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the atomic step startsvoidonEndNodeStep(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 endsvoidonEndParallelStepBranch(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 endsvoidonEndStageStep(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 endsvoidonEndWithNewSpanStep(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 endsvoidonStartNodeStep(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String agentLabel, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `node` step starts.voidonStartParallelStepBranch(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String branchName, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `parallel` branch startsvoidonStartStageStep(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String stageName, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `stage`step startsvoidonStartWithNewSpanStep(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, org.jenkinsci.plugins.workflow.job.WorkflowRun run) Just before the `withNewSpan` step startsvoidfinal voidsetOpenTelemetryTracerService(OtelTraceService otelTraceService) protected io.opentelemetry.context.ScopesetupContext(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, onStartPipelineMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.jenkins.plugins.opentelemetry.api.OpenTelemetryLifecycleListener
afterConfiguration, compareTo, ordinal
-
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:PipelineListenerJust before the `node` step starts.- Specified by:
onStartNodeStepin interfacePipelineListener- Overrides:
onStartNodeStepin 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:PipelineListenerJust after the `node` step starts.- Specified by:
onAfterStartNodeStepin interfacePipelineListener- Overrides:
onAfterStartNodeStepin 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:PipelineListenerJust before the `stage`step starts- Specified by:
onStartStageStepin interfacePipelineListener- Overrides:
onStartStageStepin 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:PipelineListenerJust after the `node` step ends- Specified by:
onEndNodeStepin interfacePipelineListener- Overrides:
onEndNodeStepin 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:PipelineListenerJust after the `stage` step ends- Specified by:
onEndStageStepin interfacePipelineListener- Overrides:
onEndStageStepin 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:PipelineListenerJust before the atomic step starts- Specified by:
onAtomicStepin interfacePipelineListener- Overrides:
onAtomicStepin 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:PipelineListenerJust after the atomic step- Specified by:
onAfterAtomicStepin interfacePipelineListener- Overrides:
onAfterAtomicStepin 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:PipelineListenerJust before the `parallel` branch starts- Specified by:
onStartParallelStepBranchin interfacePipelineListener- Overrides:
onStartParallelStepBranchin 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:PipelineListenerJust before the `parallel` branch ends- Specified by:
onEndParallelStepBranchin interfacePipelineListener- Overrides:
onEndParallelStepBranchin 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:PipelineListenerJust before the `withNewSpan` step starts- Specified by:
onStartWithNewSpanStepin interfacePipelineListener- Overrides:
onStartWithNewSpanStepin 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:PipelineListenerJust before the `withNewSpan` step ends- Specified by:
onEndWithNewSpanStepin interfacePipelineListener- Overrides:
onEndWithNewSpanStepin classAbstractPipelineListener
-
notifyOfNewStep
public void notifyOfNewStep(@NonNull org.jenkinsci.plugins.workflow.steps.Step step, @NonNull org.jenkinsci.plugins.workflow.steps.StepContext context) - Specified by:
notifyOfNewStepin 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:
nullif noSpanhas been created for theRunof the givenFlowNode
-
setOpenTelemetryTracerService
-
getTracerService
-
getTracer
@NonNull public io.opentelemetry.api.trace.Tracer getTracer() -
toString
-