Skip to content

feat(alerts): Report in Sentry and headers whether legacy models were used#110954

Merged
kcons merged 2 commits intomasterfrom
kcons/evidence
Mar 19, 2026
Merged

feat(alerts): Report in Sentry and headers whether legacy models were used#110954
kcons merged 2 commits intomasterfrom
kcons/evidence

Conversation

@kcons
Copy link
Member

@kcons kcons commented Mar 18, 2026

When testing, debugging, and analyzing perf impact, it's useful for us to be able to tell which requests used legacy models both as a client and via spans.

@kcons kcons requested review from a team as code owners March 18, 2026 00:00
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 18, 2026
try:
# Execute the endpoint
response = func(*args, **kwargs)
if isinstance(response, HttpResponseBase):
Copy link
Member

Choose a reason for hiding this comment

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

Is this mostly for safety, or what other kinds of responses might we expect?

Copy link
Member Author

Choose a reason for hiding this comment

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

The decorator doesn't require a particular result type, so this is needed for safety. But also, it's entirely possible other options exist, and this is a little dangerous as if there is some other case that is somehow incompatible, we'd break legacy behavior.
I'm a little worried that some results (streamed, perhaps?) might have runtime enforcement, but I couldn't find evidence of this in base class impls.

@kcons kcons merged commit 50134bf into master Mar 19, 2026
61 checks passed
@kcons kcons deleted the kcons/evidence branch March 19, 2026 18:04
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.

2 participants