Episode 10tracesmetricslogs

Jenkins can trace every build

Jenkins has an OpenTelemetry plugin in the update centre. One block in the jenkins.yaml the controller already boots from turns every build into a trace.

Ship telemetry toUse an OTLP endpoint you already have, from another vendor or your platform team. This one needs a one-time setup step: save your endpoint and the episodes fill it in.Set your endpointRun an OpenTelemetry Collector on your machine and watch telemetry arrive in its terminal. No account needed.More detailsShip straight to Bronto. You need an account and an API key with ingest permission.More details

Switch it on

Install the opentelemetry plugin from the update centre, add this block to the jenkins.yaml the controller boots from, and restart the controller. Every build becomes a trace, with a span per stage and one for the time it waited for an executor.

unclassified:
  openTelemetry:
    endpoint: https://ingestion.eu.bronto.io
    authentication:
      otlpHeaderAuthentication:
        headerName: x-bronto-api-key
        headerValueId: bronto-api-key
    configurationProperties: |
      otel.exporter.otlp.protocol=http/protobuf
    serviceName: ci-controller

credentials:
  system:
    domainCredentials:
      - credentials:
          - string:
              id: bronto-api-key
              secret: ${BRONTO_API_KEY}
unclassified:
  openTelemetry:
    endpoint: http://localhost:4318
    configurationProperties: |
      otel.exporter.otlp.protocol=http/protobuf
    serviceName: ci-controller

This assumes a Collector listening on localhost:4318; the Local Collector setup shows how to start one.

This uses the endpoint and auth header you saved in the setup guide.

unclassified:
  openTelemetry:
    endpoint: YOUR_OTLP_ENDPOINT
    authentication:
      otlpHeaderAuthentication:
        headerName: YOUR_AUTH_HEADER
        headerValueId: otlp-auth
    configurationProperties: |
      otel.exporter.otlp.protocol=http/protobuf
    serviceName: ci-controller

credentials:
  system:
    domainCredentials:
      - credentials:
          - string:
              id: otlp-auth
              secret: YOUR_AUTH_VALUE