Refactor exporter into modules
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user