horion.pro/docs
open app →
homedocsintroduction

introduction

horion is an AI-powered observability platform. connect a repository — horion analyzes metrics, logs, and traces instrumentation directly in your code, scores each pillar 0–100 with letter grades A/B/C/D, and opens a pull request with the actual fixes.

6 min readlevel: beginnerupdated may 3, 2026v2026.05 · betaedit on github

you keep two systems in sync today: the code that ships and the dashboards that prove it works. horion sits between them. it reads your repo, cross-references live telemetry from datadog, grafana, prometheus, or any OTel collector, and tells you exactly which spans, counters, and structured logs are missing — then opens a PR with the fix.

who this is for

this guide is the canonical reference for engineers and SREs onboarding to horion. if you only need the 90-second pitch, see the landing page; if you want pricing, see /pricing.

how horion works#

every analysis is the same five-stage flow — repo on the left, results on the right, knowledge base feeding the engine from below. hover any zone in the diagram to trace the connectors.

INTEGRATIONS
Your repository
GitHub / GitLab / Bitbucket
Push or PR triggers analysis
Telemetry backends
Datadog
Datadog
Metrics, logs, APM
Grafana
Grafana
Dashboards & alerts
Prometheus
Prometheus
Metrics scraping
OpenTelemetry
OTel Collector
Traces, metrics, logs
code + telemetry
HORION CORE
Engine
Scoring Engine
Metrics · Logs · Traces — 0–100
Horion Agent + Specialized Sub-Agents
AI analysis — code + telemetry data
Knowledge Base
SaaS or self-hosted · runs in our cloud or yours
Results
Dashboard analytics
Scores, grades, trends
Findings + suggested
Ranked fixes & next steps
PR Fix
Patch ready to merge
MCP
MCP
Horion MCP server
Model Context Protocol — query analyses & findings as tools
CursorClaude
Cursor · Devin · Claude Code
Plug into your IDE and AI coding agents — same secure Horion context
Explore & fix in flow
Ask about scores, drill into findings, or drive fixes without leaving your toolchain
  1. connect

    authorize the horion app on github, gitlab, or bitbucket. horion requests the minimum scopes needed: read source, open pull requests, read CI status. you can revoke at any time.

  2. walk

    the horion agent walks the source tree, classifies files (handlers, jobs, bootstrap, config), and locates instrumentation: tracer.startSpan, logger.info, prometheus counters, datadog wrappers, OTel SDK imports — across python, go, typescript, java, ruby, and rust.

  3. cross-reference

    if you connected a telemetry backend, horion correlates code findings with what is actually being emitted. a span declared in code but never seen in datadog becomes a higher-confidence finding than a span that simply has low cardinality.

  4. score

    the scoring engine resolves each pillar independently and combines them into a weighted global score (see pillars & weights below).

  5. fix

    for findings horion is confident about, it opens a real PR with the proposed diff and rationale. push back in a PR comment and horion refines the patch on the same branch — no need to close the PR.

the four pillars & how they're weighted#

the global score is a weighted average of five sub-scores. observability (metrics, logs, traces) accounts for 80 % — it's the product's core. security and cost are cross-cutting modifiers that pull the score down when gaps are present, but never dominate it.

pillarweightwhat it measuressignal
metrics30 %RED & USE coverage on handlers, jobs, queuescounters, histograms, gauges
logs25 %structured logging, correlation ids, levelsJSON logs, trace_id propagation
traces25 %span coverage on critical paths & egressOTel / datadog / opentracing spans
security10 %secrets in code, weak auth, token handlingcross-cutting modifier
cost10 %unstructured logs > 30 %, span fanout, label cardinalitycross-cutting modifier
weights are tunable per workspace

drop a score_config.json at the repo root with a pillar_weights key to override the defaults. the sum must be exactly 100. typical override: lift traces when you run a service mesh, lift cost when datadog billing is the primary pain.

instrumentation gate

before scoring metrics or traces, horion checks whether the repo is instrumented at all. it looks for SDK imports (opentelemetry, ddtrace, prometheus_client, statsd, etc.) and infra-level agents (datadog agent, OTel collector in compose / k8s manifests). if neither is present, the affected pillars are zeroed and the finding is upgraded to critical — perfect score requires actual emission, not declarations.

scoring & grades#

each pillar resolves independently to 0–100. findings deduct points by severity:

  • critical — −20 (dimension) / −25 (pillar)
  • warning — −10 (dimension) / −12 (pillar)
  • info — −3 (dimension) / −5 (pillar)

the global score is the weighted average of the five pillars. the grade letter maps directly from the score band:

gradescoremeaningfix PR opens for
A90–100healthy, ship itonly critical findings
B75–89solid, minor gapscritical + warning
C55–74noticeable instrumentation gapsall suggested fixes
D0–54blind spots — review before mergingall suggested fixes

findings & severity

every finding has a severity, a pillar, a source location, and (when possible) a proposed patch. the dashboard ranks findings by impact — a missing span on a high-traffic egress hits harder than the same span on a cold path.

integrations · SCM#

horion connects to the three SCMs you already use. analysis triggers on push and pull request events; fix PRs are opened back into the same provider.

providerread codeopen PRread CI status
githubcontents:readpull_requests:writechecks:read
gitlabread_repositoryapi (scoped)read_api
bitbucketrepositorypullrequest:writepipeline:read
never commit your token

HORION_TOKEN belongs in your CI secret store, never in horion.yml. tokens committed to git are auto-rotated within 5 minutes — but never rely on that.

integrations · telemetry#

horion works without a telemetry backend — it analyzes your instrumentation source. connecting one sharpens cost-impact estimates and ranks findings by what is actually being emitted in production.

datadog

read-only API key. horion queries metrics, logs, and APM endpoints to confirm spans declared in code are landing, and to detect high-cardinality tags driving your bill.

grafana & prometheus

point horion at your prometheus endpoint (or grafana data source proxy). horion uses recording rule names + scrape configs to map metric definitions back to the services that emit them.

opentelemetry

the OTel collector is the most flexible option — horion ingests OTLP directly and correlates spans, metrics, and logs across the same trace_id. recommended when you run a polyglot stack.

backend architecture#

horion runs three durable services behind the scoring engine. nothing is self-hosted — the knowledge base ships fully managed.

  • horion agent the langgraph-driven analysis engine. each node walks one slice of the repo (handlers, configs, dependencies, instrumentation) and writes to a typed AgentState. nodes never return {}; every pass updates at least one declared key, even on skip paths.
  • horion worker celery + redis pipeline that chunks, embeds, and syncs the knowledge base on schedule or on demand. it reads source blobs and exports from amazon S3 and writes vectors to the index.
  • knowledge base vector database used for semantic search and RAG-style retrieval during analysis. the agent queries it for similar prior findings, proven fix patterns, and per-org code conventions.
why split the worker out

indexing is bursty and CPU-bound; analysis is latency-sensitive. keeping them on separate celery queues (with their own broker prefix) prevents a long indexing job from delaying a developer waiting on a PR check.

streaming results

the dashboard receives pillar scores as they resolve via SSE. analyses typically complete in 30–120 s end-to-end, with each pillar streaming an update the moment it's ready.

MCP server#

the horion MCP server exposes the same context the dashboard sees as tool-callable endpoints. plug it into cursor, claude code, or devin and your coding agent can query analyses, drill into findings, and drive fixes without leaving the editor.

~/.claude/mcp.json
{
  "mcpServers": {
    "horion": {
      "command": "npx",
      "args": ["-y", "@horion/mcp-server"],
      "env": { "HORION_TOKEN": "hz_live_••••••" }
    }
  }
}

tools the MCP server exposes:

  • analyses.listrecent analyses across the workspace
  • analyses.getpillar scores, findings, fix PR status
  • findings.searchfull-text + semantic search across findings
  • findings.explainmodel rationale + source location
  • repo.score_historyscore timeline for a repo (90 days)
zero inbound, WS egress

the MCP server keeps a websocket open to the horion control plane and never listens on a public port. nothing inbound, nothing self-hosted, nothing to rotate beyond your token.

quickstart#

once a repo is connected, you can trigger an analysis from the dashboard, the cli, or the api. all three return the same result — pick the one that fits your workflow.

~/dev/payments
# install once, scoped to the active org
$ npm install -g @horion/cli

# authenticate with a personal token from horion.pro/settings/tokens
$ horion auth login --token hz_live_••••••

# run a full analysis on the current repo
$ horion analyze \
    --repo acme/payments \
    --type full \
    --tag team=payments \
    --tag env=prod
credits charge on completion, not enqueue

queued or cancelled analyses are free. once an analysis transitions to running, the credit count is committed even if you close the browser tab.

next steps#

was this page helpful?