-
Notifications
You must be signed in to change notification settings - Fork 892
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
Use logger class and send App Check dummy token in header #8591
Conversation
🦋 Changeset detectedLatest commit: 9e8ef56 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Analysis Report 1Affected Products
Test Logs |
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.
Looks like you can drop the base64 import.
Size Report 1Affected Products
Test Logs |
Thanks, got it. |
App Check's
getToken()
should never throw, but in case of an error getting a valid App Check token, it fills in the "token" field with a standard dummy token, and adds an "error" field. The backend needs to receive these dummy tokens in the header so the developer can track failed requests. Right now we just don't send them. This change sends the dummy token, and logs a warning if an error is found.I also realized I forgot to include the standard
logger
API in VertexAI so I added it. This is a wrapper aroundconsole
used across all products that adds a product name prefix and also enables the globalsetLogLevel()
to apply to any console messages called through this wrapper.