Skip to content

feat(db): Add model name to EncryptedField metrics tags#106531

Merged
vgrozdanic merged 1 commit intomasterfrom
vgrozdanic/encrypted-field-model-name-metrics
Jan 20, 2026
Merged

feat(db): Add model name to EncryptedField metrics tags#106531
vgrozdanic merged 1 commit intomasterfrom
vgrozdanic/encrypted-field-model-name-metrics

Conversation

@vgrozdanic
Copy link
Member

@vgrozdanic vgrozdanic commented Jan 19, 2026

Add model name to EncryptedField encryption/decryption metrics tags.

Uses __set_name__ to capture the Django model class name where the
EncryptedField is defined. This allows metrics for database.encrypted_field.encrypt
and database.encrypted_field.decrypt to be tagged with the model name,
providing better observability into which models are using encrypted fields
and their encryption/decryption performance characteristics.

Closes TET-1725: Add table/model name as a tag to metrics

Use __set_name__ to capture the Django model class name where the
EncryptedField is used, allowing metrics to be tagged with the model
name for better observability of encryption operations.
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 19, 2026
@linear
Copy link

linear bot commented Jan 19, 2026

@vgrozdanic vgrozdanic requested review from a team and oioki January 20, 2026 06:38
@vgrozdanic vgrozdanic merged commit c67770f into master Jan 20, 2026
68 checks passed
@vgrozdanic vgrozdanic deleted the vgrozdanic/encrypted-field-model-name-metrics branch January 20, 2026 14:12
@github-actions github-actions bot locked and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants