4c2e25af8a
Implements three observability improvements: #82 — publish_grafana_copy(): Uses SQLite online backup API (WAL-safe) to atomically publish a consistent read-only copy beside the target. Adds --publish-copy option to grafana-schema and snapshot CLI commands. #83 — examples/grafana/: Minimal working Grafana setup with docker-compose, provisioning datasource/dashboard YAML, and three dashboard JSON files (mt5cli-overview, mt5cli-trades, mt5cli-market). All queries use grafana_* views; no credentials or private paths included. #84 — mt5cli/telemetry.py: Optional OTel metrics behind mt5cli[otel] extra. Base install is unaffected. Adds _Mt5Metrics singleton (no-op until configure_metrics() is called), wraps update_history() and update_observability() with record_history_update / record_snapshot_update context managers, and emits account/position gauges from snapshots. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
404 B
YAML
17 lines
404 B
YAML
# Grafana datasource provisioning for mt5cli SQLite.
|
|
#
|
|
# Requires the frser-sqlite-datasource plugin:
|
|
# grafana-cli plugins install frser-sqlite-datasource
|
|
#
|
|
# Set `path` to the absolute path of your published history.grafana.db file.
|
|
|
|
apiVersion: 1
|
|
|
|
datasources:
|
|
- name: mt5cli-SQLite
|
|
type: frser-sqlite-datasource
|
|
access: proxy
|
|
isDefault: true
|
|
jsonData:
|
|
path: /data/mt5cli.db
|