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
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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 step
    void
    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 starts
    void
    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 ends
    void
    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 ends
    void
    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 ends
    void
    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 starts
    void
    onStartStageStep(org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode stepStartNode, String stageName, org.jenkinsci.plugins.workflow.job.WorkflowRun run)
    Just before the `stage`step starts
    void
     
    final void
     
    protected io.opentelemetry.context.Scope
    setupContext(org.jenkinsci.plugins.workflow.job.WorkflowRun run, org.jenkinsci.plugins.workflow.graph.FlowNode node)
     
     

    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

  • 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 interface PipelineListener
      Overrides:
      onStartNodeStep in class AbstractPipelineListener
    • 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 interface PipelineListener
      Overrides:
      onAfterStartNodeStep in class AbstractPipelineListener
    • 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 interface PipelineListener
      Overrides:
      onStartStageStep in class AbstractPipelineListener
    • 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 interface PipelineListener
      Overrides:
      onEndNodeStep in class AbstractPipelineListener
    • 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 interface PipelineListener
      Overrides:
      onEndStageStep in class AbstractPipelineListener
    • getStepHandlers

      protected List<StepHandler> 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 interface PipelineListener
      Overrides:
      onAtomicStep in class AbstractPipelineListener
    • 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 interface PipelineListener
      Overrides:
      onAfterAtomicStep in class AbstractPipelineListener
    • 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 interface PipelineListener
      Overrides:
      onStartParallelStepBranch in class AbstractPipelineListener
    • 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 interface PipelineListener
      Overrides:
      onEndParallelStepBranch in class AbstractPipelineListener
    • notifyOfNewStep

      public void notifyOfNewStep(@NonNull org.jenkinsci.plugins.workflow.steps.Step step, @NonNull org.jenkinsci.plugins.workflow.steps.StepContext context)
      Specified by:
      notifyOfNewStep in interface org.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 no Span has been created for the Run of the given FlowNode
    • setOpenTelemetryTracerService

      @Inject public final void setOpenTelemetryTracerService(@NonNull OtelTraceService otelTraceService)
    • getTracerService

      @NonNull public OtelTraceService getTracerService()
    • getTracer

      @NonNull public io.opentelemetry.api.trace.Tracer getTracer()
    • toString

      public String toString()
      Overrides:
      toString in class Object