OpenTelemetry observability mod for Eco game servers
  • C# 99.2%
  • Shell 0.8%
Find a file
Kai Siren 778bc5a429
Some checks are pending
build / build (push) Waiting to run
release / release (push) Waiting to run
chore(pre-commit): adopt context-load-points hooks (v0.11.1)
Part of the agentic-os-kai#505 load-point framework rollout.

closes coilysiren/eco-telemetry#13

Audit-log: coily://1780119203/AGPHOX3P - coily git commit
2026-05-30 10:12:51 -07:00
.agents/skills/eco-telemetry docs: add per-repo .agents pointer skill 2026-05-30 10:12:49 -07:00
.claude lockdown: sync to coily v2.45.0 [skip ci] 2026-05-28 09:28:11 +00:00
.coily chore(catalog): drop providesApis + bump agentic-os hook to v0.6.0 2026-05-27 21:55:08 -07:00
.github/workflows chore(ci): remove codex-review-gate + undraft-and-poke-codex workflows 2026-05-16 15:42:59 -07:00
Configs metrics surface: meterprovider + per-signal endpoints + eco.players.online 2026-04-27 20:45:13 -07:00
docs chore: clear pre-commit code-comment and doc-layout violations 2026-05-27 20:37:47 -07:00
src chore: clear pre-commit code-comment and doc-layout violations 2026-05-27 20:37:47 -07:00
.gitignore chore: commit coily lockdown baseline, gitignore host-local Claude state 2026-04-24 15:42:50 -07:00
.pre-commit-config.yaml chore(pre-commit): adopt context-load-points hooks (v0.11.1) 2026-05-30 10:12:51 -07:00
AGENTS.md chore: clear pre-commit code-comment and doc-layout violations 2026-05-27 20:37:47 -07:00
CLAUDE.md Add CLAUDE.md import shim for AGENTS.md 2026-05-08 05:39:13 -07:00
EcoTelemetry.csproj Bump OpenTelemetry.Api from 1.12.0 to 1.15.3 (#1) 2026-05-13 11:43:35 -07:00
LICENSE Initial scaffold: EcoTelemetry mod for Eco 2026-04-23 18:18:00 -07:00
README.md chore: complete trifecta + re-enable catalog-doc-size + catalog-trifecta 2026-05-15 23:44:54 -07:00

EcoTelemetry

OpenTelemetry-backed observability for Eco game servers. Exports exceptions, runtime metrics, simulation perf, and traces over OTLP so server admins can point them at Sentry, Grafana, Datadog, Honeycomb, or any other OTLP-compatible backend.

Eco's built-in stats system is designed for in-game economic and ecological reporting. It does not surface SRE-shaped signals: process health, exception rates, simulation tick latency, or web-request latency. EcoTelemetry fills that gap.

Status

Early. v1 ships:

  • Logs: exception capture (AppDomain.UnhandledException, optional FirstChanceException) and an Eco ILogWriter decorator that mirrors the server's own log lines through OTel.
  • Metrics: runtime instrumentation (GC, threadpool, allocations) plus eco.players.online. Each signal can route to its own OTLP endpoint via per-signal overrides.

Traces are stubbed.

Install

  1. Download EcoTelemetry-<version>.zip from the latest release.
  2. Extract into your Eco server's Mods/ directory so the result looks like Mods/EcoTelemetry/EcoTelemetry.dll.
  3. Copy Configs/EcoTelemetry.example.json to Configs/EcoTelemetry.json and edit:
    • OtlpEndpoint: your collector's OTLP HTTP or gRPC endpoint
    • OtlpHeaders: any auth headers (e.g. x-honeycomb-team=... or Sentry's auth header)
    • ServiceName, ResourceAttributes: how this server identifies itself
    • per-signal toggles: EnableLogs, EnableMetrics, EnableTraces
  4. Restart the Eco server.

If OtlpEndpoint is empty, EcoTelemetry falls back to the console exporter so you can verify the pipeline locally before pointing it at a real backend.

Build

dotnet build EcoTelemetry.csproj -c Release

The build pulls Eco.ReferenceAssemblies from NuGet for type-checking. The DLL plus its OpenTelemetry dependencies must be deployed together — see .github/workflows/release.yml for how the release artifact is assembled.

Routing signals

Each signal (logs, metrics) can target its own OTLP endpoint via the OtlpLogsEndpoint / OtlpMetricsEndpoint overrides; anything left blank falls back to the top-level OtlpEndpoint. Empty everywhere means console exporter (handy for first-boot smoke test).

Sentry (logs)

Sentry's OTLP endpoint is documented at https://docs.sentry.io/platforms/javascript/install/cdn/#using-opentelemetry:

  • OtlpLogsEndpoint: https://o<org>.ingest.sentry.io/api/<project>/otlp/v1/logs
  • OtlpLogsHeaders: x-sentry-auth=Sentry sentry_key=<dsn-public-key>

VictoriaMetrics (metrics)

vmsingle exposes a native OTLP ingest endpoint at /opentelemetry/api/v1/push on its HTTP API port (8428 by default). No auth header required.

  • OtlpMetricsEndpoint: http://<vmsingle-host>:8428/opentelemetry/api/v1/push
  • OtlpMetricsProtocol: HttpProtobuf

Any OTLP-capable backend (Honeycomb, Grafana Cloud, OTel Collector) works the same way - there is no backend-specific code path.

Public sources

EcoTelemetry is built against Eco.ReferenceAssemblies and the public modding documentation at https://wiki.play.eco/en/Modding, https://docs.play.eco/, and https://github.com/StrangeLoopGames/EcoModKit.

License

MIT. See LICENSE.

Commands

Dev commands are declared in .coily/coily.yaml. Run them as coily exec <verb>.

See also

Cross-reference convention from coilysiren/agentic-os#59.