From 27671e05b0834bfd93f142b7312c08a212d750a1 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Sun, 5 Jul 2026 05:41:52 +0000 Subject: [PATCH] feat(usage): declare resource-dimension setter stubs on base Context Adds setService / setResource / setResourceId / setResourceInternalId no-op stubs on the base CE Context, matching the existing pattern for setResourcePath. The Cloud Context subclass overrides these with real storage so per-metric rows carry the dimension in their own columns instead of via a baked metric-name template. --- src/Appwrite/Usage/Context.php | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/Appwrite/Usage/Context.php b/src/Appwrite/Usage/Context.php index f095eb4981..49e852fed7 100644 --- a/src/Appwrite/Usage/Context.php +++ b/src/Appwrite/Usage/Context.php @@ -71,6 +71,46 @@ class Context return ''; } + public function setService(string $service): self + { + return $this; + } + + public function getService(): string + { + return ''; + } + + public function setResource(string $resource): self + { + return $this; + } + + public function getResource(): string + { + return ''; + } + + public function setResourceId(string $resourceId): self + { + return $this; + } + + public function getResourceId(): string + { + return ''; + } + + public function setResourceInternalId(string $resourceInternalId): self + { + return $this; + } + + public function getResourceInternalId(): string + { + return ''; + } + /** * Reset the context */