Monorepo for Tangled tangled.org
856
fork

Configure Feed

Select the types of activity you want to include in your feed.

appview/metrics: add prometheus HTTP metrics, middleware, and endpoint #303

open opened by paeth.xyz targeting master from paeth.xyz/tangled-core: appview-metrics

The default metrics listener port is 127.0.0.1:7101, so it should only be accessible from the host itself, not the web. Port 7000 is where knotmirror currently exports, so 7101 is chosen to not collide. Lastly, this incidentally exposes lower-level go client metrics (e.g., garbage collection info) as well as AT and Jetstream metrics already calculated by the bsky indigo and jetstream packages - which could be very useful.

Signed-off-by: Kevin tangled-jj@paeth.xyz

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:dzif5zfmzlbs6cdc67gzlv65/sh.tangled.repo.pull/3mkve73laua22
+8
Interdiff #0 #1
appview/config/config.go

This file has not been changed.

appview/metrics/http.go

This file has not been changed.

appview/state/router.go

This file has not been changed.

cmd/appview/main.go

This file has not been changed.

+8
nix/modules/appview.nix
··· 33 33 description = "Listen address for the appview service"; 34 34 }; 35 35 36 + metricsListenAddr = mkOption { 37 + type = types.str; 38 + default = "127.0.0.1:7101"; 39 + example = "0.0.0.0:7101"; 40 + description = ''Listen address for the Prometheus metrics endpoint (`/metrics`).''; 41 + }; 42 + 36 43 dbPath = mkOption { 37 44 type = types.str; 38 45 default = "/var/lib/appview/appview.db"; ··· 286 293 { 287 294 TANGLED_DB_PATH = cfg.dbPath; 288 295 TANGLED_LISTEN_ADDR = cfg.listenAddr; 296 + TANGLED_METRICS_LISTEN_ADDR = cfg.metricsListenAddr; 289 297 TANGLED_APPVIEW_HOST = cfg.appviewHost; 290 298 TANGLED_APPVIEW_NAME = cfg.appviewName; 291 299 TANGLED_DEV =

History

2 rounds 0 comments
sign up or login to add to the discussion
paeth.xyz submitted #1
1 commit
expand
appview/metrics: add prometheus HTTP metrics, middleware, and endpoint
merge conflicts detected
expand
  • appview/config/config.go:14
  • appview/state/router.go:11
  • cmd/appview/main.go:5
  • nix/modules/appview.nix:33
expand 0 comments
paeth.xyz submitted #0
1 commit
expand
appview/metrics: add prometheus HTTP metrics, middleware, and endpoint
expand 0 comments