ActivityPub discovery endpoints (phase 1, step 3)
Registered only when federation is enabled: - WebFinger (acct: and actor-URL resources, the instance actor, CORS *) - host-meta, NodeInfo discovery and 2.1 (counts users sharing) - /users/<name>: the Person actor for ActivityPub clients, a redirect to the UI profile page for browsers (for any name, so redirects don't reveal accounts); outbox/followers/following collections - /actor: the instance Application actor - Inboxes accept (202) and count deliveries; size-limited; processing arrives in phase 2. Actors advertise manual approval until then. - Unknown and non-sharing users get byte-identical 404s; all IDs come from FEDERATION_BASE_URL, never the request - Federation metrics: lookups, sharing changes, inbox deliveries - scrobbler.__version__ joins the core's public surface for NodeInfo Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
1 parent
e890568c54
commit
ce39e8f865
6 files changed
+365
-1
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""Federation's own metrics (the core's HTTP metrics already cover rate/latency)."""
|
||||
|
||||
from prometheus_client import Counter
|
||||
|
||||
lookups_total = Counter(
|
||||
"scrobbler_federation_lookups_total",
|
||||
"Fediverse lookups answered: WebFinger, actor, NodeInfo, profile",
|
||||
["kind", "result"],
|
||||
)
|
||||
sharing_changes_total = Counter(
|
||||
"scrobbler_federation_sharing_changes_total",
|
||||
"Users switching fediverse sharing on or off",
|
||||
["change"],
|
||||
)
|
||||
inbox_requests_total = Counter(
|
||||
"scrobbler_federation_inbox_requests_total",
|
||||
"Deliveries received at an inbox (not yet processed: phase 2)",
|
||||
["inbox"],
|
||||
)
|
||||
|
||||
# Every scrobbler_federation_* series name, for the dashboard consistency test.
|
||||
SERIES = (
|
||||
"scrobbler_federation_lookups_total",
|
||||
"scrobbler_federation_sharing_changes_total",
|
||||
"scrobbler_federation_inbox_requests_total",
|
||||
)
|
||||
Reference in new issue
Block a user