Blacksmith
Connect
Connect Blacksmith from the terminal. Pass --help for the flags Blacksmith accepts.
polylane integration connect --type blacksmithAn organization token that an organization admin creates with `blacksmith org-token create`, and the GitHub organization login whose jobs run on Blacksmith.
Connect your Blacksmith organization with an organization token and the GitHub organization that runs its jobs on Blacksmith.
- An organization admin installs the Blacksmith CLI with
curl -fsSL https://get.blacksmith.sh | shand runsblacksmith org-token create --label polylane. Blacksmith confirms admin access in the browser and prints the token once. - Paste the token into Polylane and enter the GitHub organization login whose jobs run on Blacksmith. Polylane checks that the token can read that organization.
A user token from blacksmith auth login also works, because it is also bound to one organization.
How it works
What Polylane reads
Polylane only reads from Blacksmith: job runs, job logs, steps, tests, metrics, log search, usage and analytics. Blacksmith adds no nodes to the context graph. Its jobs belong to the GitHub repositories that the GitHub connection already syncs.
What Polylane monitors
Polylane watches job failure rates, job durations and error log lines across the organization:
- Failure rate:
failureandtimed_outjobs over all concluded jobs. Cancelled and skipped jobs do not count. An hour with fewer than five concluded jobs has no rate. - Duration: the average duration of successful and failed jobs.
- Error log lines: the number of log lines at level
error. Only a sustained increase counts as worse.
Each check uses hourly buckets over one day, and each job goes in the bucket of its completion time. A sustained change opens an issue.
Failed jobs on GitHub
Blacksmith publishes no webhooks. Jobs on Blacksmith runners reach Polylane as GitHub Actions events from the GitHub connection. When a workflow run fails on the default branch, it becomes an alert. Polylane triages the alert like any other alert, and a new failure starts an investigation.
Agent tools
During an investigation, agents read Blacksmith with the tools under Blacksmith APIs. Each call reads the Blacksmith installation of the connected organization.
Polylane checks the token every six hours. When Blacksmith is not available, a check keeps the current health of the token.
Blacksmith APIs
Blacksmith organization tokens have no scopes. Their access follows the organization in GitHub, and a token reads jobs, logs, usage and analytics across the whole organization. These are the Blacksmith APIs Polylane uses:
| Tool | Blacksmith API | What it unlocks |
|---|---|---|
blacksmithJobs | Jobs, with their steps, tests, metrics and containers | Finds failed, slow and running jobs and reads the step, test and CPU and memory data of one job. |
blacksmithJobLogs | Job logs | Reads the log lines of one job. |
blacksmithLogs | Log search and log histogram | Searches the logs of every job in the organization and counts matches over time. |
blacksmithAnalytics | Job aggregates and Actions usage | Reads job durations, CPU and memory use, and billable minutes. |
An organization token can also manage testboxes, caches and sticky disks. Polylane uses only the read APIs in this table.
Token replacement
You can replace the token on the Blacksmith integration page. Polylane accepts the new token only when it names the same Blacksmith installation. Otherwise Polylane keeps the current token.
Disconnecting
When you disconnect, Polylane leaves the organization token in Blacksmith. Revoke it with blacksmith org-token revoke <id>.
Disconnect
Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what Blacksmith's API lets it remove. The following stays until you remove it yourself:
- Blacksmith organization token
polylane integration disconnect <id>Tools
4Operations agents can perform in threads.