Skip to content

Conversation

@GabeVillalobos
Copy link
Member

Adds a new method called get_debug_metadata, which returns a filtered metadata field, dictated by the child class's _get_debug_metadata_keys. The latter method acts as an allow list for non-sensitive fields to be logged or surfaced via admin APIs

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 9, 2026
@GabeVillalobos GabeVillalobos marked this pull request as ready for review January 12, 2026 17:01
@GabeVillalobos GabeVillalobos requested review from a team as code owners January 12, 2026 17:01
A dictionary containing only the allowlisted metadata fields.
"""
allowed_keys = self._get_debug_metadata_keys()
return {key: value for key, value in self.model.metadata.items() if key in allowed_keys}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also return None for keys we expect to exist for debugging but don't actually exist in the metadata?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we can, I can invert this logic.

@GabeVillalobos GabeVillalobos merged commit f9ae10f into master Jan 13, 2026
66 checks passed
@GabeVillalobos GabeVillalobos deleted the gv/add_way_to_surface_non_sensitive_metadata_for_debug branch January 13, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants