# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2026 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT # --- Sentry selectors for per-domain LVE records --------------------------- # # Every per-domain LVE record that can reach Sentry carries the same tag, so a # release monitor selects the feature's issues with `feature:domain_lve` # instead of matching message text. Matching text does not work here: the call # sites are spread over lveapi, lvectllib and this package, no two word their # messages the same way, and the wording is expected to change while the # feature is young -- which would silently break any saved search built on it. # # lve-stats3 tags its own per-domain events with the same key and value, so one # query spans both halves of the feature. DOMAIN_LVE_SENTRY_TAG = 'domain_lve' def domain_lve_sentry_extra(*fingerprint): """`extra=` for a per-domain LVE log record that should reach Sentry. Pass the parts that identify the FAILURE, never the account, domain or any count: raven groups on the formatted message, so a uid or a per-server total in the grouping key opens one issue per server instead of one issue seen on many servers. Those values still belong in the message -- they are what makes the event useful once opened -- they just must not decide which issue it lands in. """ return { 'tags': {'feature': DOMAIN_LVE_SENTRY_TAG}, 'fingerprint': ['domain-lve', *fingerprint], }