Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This changelog documents user-relevant changes to the GitHub runner charm.

## 2026-05-20

- Enhanced OpenTelemetry Collector configuration in the pre-job script to expose local OTLP (gRPC/HTTP) and Loki endpoints for workflow to push observability data.
- Enable system.cpu.logical.count and system.cpu.physical.count metrics.

## 2026-04-24

- Exposed the configured GitHub path (org or repository) as a Terraform module output, allowing consumers to make decisions based on which path a runner is registered to.
Expand Down
115 changes: 102 additions & 13 deletions github-runner-manager/src/github_runner_manager/templates/pre-job.j2
Original file line number Diff line number Diff line change
Expand Up @@ -144,38 +144,127 @@ receivers:
collection_interval: 10s
scrapers:
cpu:
metrics:
system.cpu.logical.count:
enabled: true
system.cpu.physical.count:
enabled: true
memory:
disk:
filesystem:
network:
load:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:44317
http:
endpoint: 0.0.0.0:44318
loki:
protocols:
http:
endpoint: 0.0.0.0:43100
Comment on lines +160 to +166
use_incoming_timestamp: true
processors:
attributes/github_labels:
attributes/self_hosted_runner_github_labels:
actions:
- key: github_runner
- key: service.name
action: upsert
value: "$RUNNER_NAME"
- key: github_workflow
value: "self-hosted-runner"
- key: github.repository
action: upsert
value: "$GITHUB_WORKFLOW"
- key: github_job
value: "$GITHUB_REPOSITORY"
- key: github.runner
action: upsert
value: "$GITHUB_JOB"
- key: github_repository
value: "$RUNNER_NAME"
- key: github.workflow
action: upsert
value: "$GITHUB_REPOSITORY"
value: "$GITHUB_WORKFLOW"
- key: github.job
action: upsert
value: "$GITHUB_JOB"
- key: github.run.id
action: upsert
value: "$GITHUB_RUN_ID"
- key: github.run.attempt
action: upsert
value: "$GITHUB_RUN_ATTEMPT"
- key: host.arch
action: upsert
value: "$(uname -m)"
resource/self_hosted_runner_github_labels:
attributes:
- key: service.name
action: upsert
value: "self-hosted-runner"
- key: github.repository
action: upsert
value: "$GITHUB_REPOSITORY"
Comment thread
yanksyoon marked this conversation as resolved.
- key: github.runner
action: upsert
value: "$RUNNER_NAME"
- key: github.workflow
action: upsert
value: "$GITHUB_WORKFLOW"
- key: github.job
action: upsert
value: "$GITHUB_JOB"
- key: github.run.id
action: upsert
value: "$GITHUB_RUN_ID"
- key: github.run.attempt
action: upsert
value: "$GITHUB_RUN_ATTEMPT"
- key: host.arch
action: upsert
value: "$(uname -m)"
transform/self_hosted_runner_loki_labels:
log_statements:
- context: resource
statements:
- >
set(resource.attributes["loki.resource.labels"],
Concat([resource.attributes["loki.resource.labels"],
", service.name, github.repository, github.runner, github.workflow, github.job, github.run.id, github.run.attempt, host.arch"], ""))
where resource.attributes["loki.resource.labels"] != nil
- >
set(resource.attributes["loki.resource.labels"],
"service.name, github.repository, github.runner, github.workflow, github.job, github.run.id, github.run.attempt, host.arch")
where resource.attributes["loki.resource.labels"] == nil
batch:
exporters:
otlp/mimir:
endpoint: {{ otel_collector_endpoint }}
otlp/self_hosted_runner:
endpoint: "$ACTION_OTEL_EXPORTER_OTLP_ENDPOINT"
tls:
insecure: true
service:
pipelines:
metrics:
receivers: [hostmetrics]
processors: [attributes/github_labels, batch]
exporters: [otlp/mimir]
processors: [attributes/self_hosted_runner_github_labels, batch]
exporters: [otlp/self_hosted_runner]
metrics/otlp:
receivers: [otlp]
processors: [attributes/self_hosted_runner_github_labels, batch]
exporters: [otlp/self_hosted_runner]
logs/otlp:
receivers: [otlp]
processors:
- resource/self_hosted_runner_github_labels
- transform/self_hosted_runner_loki_labels
- batch
exporters: [otlp/self_hosted_runner]
logs/loki:
receivers: [loki]
processors:
- resource/self_hosted_runner_github_labels
- transform/self_hosted_runner_loki_labels
- batch
exporters: [otlp/self_hosted_runner]
traces:
receivers: [otlp]
processors: [resource/self_hosted_runner_github_labels, batch]
exporters: [otlp/self_hosted_runner]
EOF

/usr/bin/sudo /usr/bin/snap enable opentelemetry-collector
Expand Down
Loading