-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass in tenant_id to kv_store in monitoring job #3726
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
def __init__( | ||
self, redis_client: Redis | None = None, tenant_id: str | None = None | ||
) -> None: | ||
self.tenant_id = tenant_id or CURRENT_TENANT_ID_CONTEXTVAR.get() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly wary of default None
to the current tenant ID. Elsewhere, we treat it as a valid tenant ID / as POSTGRES_DEFAULT_SCHEMA
. Had a similar debate around get_session_with_tenant
(default to a sentinel if nothing passed in?, etc.) and ended up deciding on different entrypoint (get_session_with_default_tenant
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -94,16 +94,16 @@ def optional_telemetry( | |||
if DISABLE_TELEMETRY: | |||
return | |||
|
|||
tenant_id = tenant_id or CURRENT_TENANT_ID_CONTEXTVAR.get() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar comment here
Description
We weren't passing in the right tenant ID for cloud-monitoring -> silent telemetry failures.
https://linear.app/danswer/issue/DAN-1296/fix-monitoring-telemetry-on-our-cloud
How Has This Been Tested?
kubectl cp
ed the files over to the monitoring pod and ran:Then verified we got the expected packet on the telemetry server.
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.