feat: each error in Sentry names the commit it came from
The API image keeps the commit it was built from (RELEASE, from VCS_REF); the API, the worker and the browser report it as the Sentry release unless the stack sets IMAGE_TAG. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ import httpx
|
||||
from fastapi import APIRouter, HTTPException, Request, Response
|
||||
|
||||
from ..core import db
|
||||
from .. import catalog, grade_rules, mail
|
||||
from .. import catalog, grade_rules, mail, observability
|
||||
from ..core.auth import client_ip, owner, new_session, rate_limit
|
||||
from ..core.limits import upload_limit_bytes
|
||||
from ..core.pricing import manual_extra_cents
|
||||
@@ -66,7 +66,7 @@ def session(request: Request, response: Response):
|
||||
# Public by design: the browser initialises Sentry with these; empty is off.
|
||||
'sentry_dsn_web': os.environ.get('SENTRY_DSN_WEB', '').strip(),
|
||||
'sentry_environment': os.environ.get('SENTRY_ENVIRONMENT') or ENVIRONMENT,
|
||||
'sentry_release': os.environ.get('IMAGE_TAG', ''),
|
||||
'sentry_release': observability.release() or '',
|
||||
# Public by design: Mercado Pago's card form needs it in the browser.
|
||||
'payment_public_key': os.environ.get('MP_PUBLIC_KEY', '') if payment.name == 'mercadopago' else '',
|
||||
# The delivery options the cart quotes, or none: pickup only.
|
||||
|
||||
Reference in New Issue
Block a user