14 lines
304 B
Python
14 lines
304 B
Python
from __future__ import annotations
|
|
|
|
from fastapi import FastAPI
|
|
from fastapi.responses import PlainTextResponse
|
|
|
|
from .metrics import render_metrics
|
|
|
|
app = FastAPI(title="openclaw-usage-exporter")
|
|
|
|
|
|
@app.get("/metrics", response_class=PlainTextResponse)
|
|
def metrics() -> str:
|
|
return render_metrics()
|