Skip to content

Commit 49d61cf

Browse files
Merge pull request #1358 from roboflow/feat/device-id-in-resource-details
if DEVICE_ID env is set, store it in resource_details
2 parents 6b2b896 + 5b2be18 commit 49d61cf

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

inference/usage_tracking/collector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from inference.core.env import (
2929
API_KEY,
3030
DEDICATED_DEPLOYMENT_ID,
31+
DEVICE_ID,
3132
GCP_SERVERLESS,
3233
LAMBDA,
3334
REDIS_HOST,
@@ -578,6 +579,8 @@ def _extract_usage_params_from_func_kwargs(
578579
}
579580
if DEDICATED_DEPLOYMENT_ID:
580581
resource_details["dedicated_deployment_id"] = DEDICATED_DEPLOYMENT_ID
582+
if DEVICE_ID:
583+
resource_details["device_id"] = DEVICE_ID
581584
resource_id = ""
582585
# TODO: add requires_api_key, True if workflow definition comes from platform or model comes from workspace
583586
if category == "workflows":

0 commit comments

Comments
 (0)