Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Perseus Observability

Local dashboard for Tokenomics/Perseus debugging against devstack or v3. It serves the UI on 127.0.0.1:4177, samples Kubernetes/ClickHouse/Postgres/RabbitMQ/API stats, and stores history in CSV/JSONL files in this folder.

Prerequisites

  • Node.js available locally.
  • For devstack: gcloud authenticated with access to the devstack jumphost.
  • For v3: local kubectl context configured with access to the v3 cluster.

Install dependencies:

cd ~/work/tokenomics/persesus
npm install

If your shell has an IDE-provided npm prefix, clear it first:

unset npm_config_prefix

Start Devstack

Devstack runs kubectl through the jumphost using gcloud compute ssh.

cd ~/work/tokenomics/persesus
unset npm_config_prefix

export TARGET_ENV=devstack
export DEVSTACK=1
export DEVSTACK_HOST=gitlab-runner
export DEVSTACK_ZONE=us-central1-c
export DEVSTACK_PROJECT=galileo-stacks-dev
export DEVSTACK_NS=tokenomics-consumer
export DEVSTACK_API_NS=tokenomics-consumer
export PORT=4177

node server.js

Equivalent npm form:

TARGET_ENV=devstack DEVSTACK=1 DEVSTACK_NS=tokenomics-consumer PORT=4177 npm start

Start V3

V3 uses local kubectl directly. Make sure your current kube context points at v3.

cd ~/work/tokenomics/persesus
unset npm_config_prefix

export TARGET_ENV=v3
export V3_TARGET_NS=galileo
export V3_API_NS=galileo
export PORT=4177

node server.js

Equivalent npm form:

TARGET_ENV=v3 V3_TARGET_NS=galileo PORT=4177 npm start

Open:

http://127.0.0.1:4177

Sharing

To share the local dashboard:

cloudflared tunnel --url http://127.0.0.1:4177

Keep the dashboard server and cloudflared process running while others use the URL.

Bruno API Collection

A Bruno collection for Tokenomics UI/API calls lives in:

~/work/tokenomics/bruno/Perseus Tokenomics API

Open that folder in Bruno, choose the Devstack or V3 environment, and set:

baseUrl
token
organizationId
directoryGenerationId
startDate
endDate
provider
model

The V1 requests mirror the UI paths under /tokenomics/v1/*. The legacy folder contains the older /tokenomics/get_* reads for comparison.

Configuration

Common optional overrides:

export INTERVAL_SECONDS=10
export INGEST_SYNC_INTERVAL_SECONDS=60
export IMAGE_VERSIONS_INTERVAL_SECONDS=300
export DATA_CORRECTNESS_AUTO=0
export DATA_CORRECTNESS_INTERVAL_SECONDS=300
export DATA_CORRECTNESS_INCLUDE_RAW_FACTS=0

export CLICKHOUSE_POD=chi-clickhouse-cluster-0-0-0
export POSTGRES_POD=postgres-v16-0
export RABBITMQ_POD=rabbitmq-cluster-server-0
export PROMETHEUS_URL=http://prometheus.galileo-monitoring.svc.cluster.local:9090

Service matching overrides:

export INGEST_PATTERN=ingest-service-tokenomics-consumer
export API_POD_PATTERN=api-
export DATA_SERVICE_PATTERN=data-service-
export UI_POD_PATTERN=ui-

Access Checks

Devstack SSH check:

gcloud compute ssh gitlab-runner \
  --zone us-central1-c \
  --project galileo-stacks-dev \
  --tunnel-through-iap \
  --command "kubectl get pods -n tokenomics-consumer"

V3 kubectl check:

kubectl get pods -n galileo

Data Files

The app reads and writes these files in this folder:

ingest-service-tokenomics-consumer-usage.csv
service-pod-usage.csv
service-request-stats.csv
tokenomics-api-request-stats.csv
ingest-provider-sync-events.jsonl
ui-tokenomics-api-requests.jsonl
clickhouse-query-log.jsonl
postgres-query-stats.jsonl
rabbitmq-queue-stats.jsonl
data-correctness-samples.jsonl
service-image-versions.jsonl

These files are local history. They are not required to start the app; missing files are recreated on startup.

About

Sliced Stacked Observability

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages