fix(performance): 메타 연결 테스트 진단이 잘리던 문제
- 비밀값 가림(redact_text)의 기본 300자 한도에서 긴 메타 원문·안내 뒤의 [진단]이 "[진…"으로 잘렸다. - 연결 테스트 문구를 [진단] 먼저 + 메타 원문(긴 안내 주소 제거) 뒤로 바꾸고, 광고 연동 오류 문구 한도를 ad_sync.AD_MESSAGE_MAX(1200자)로. - 테스트: 설정 연결 테스트 경로(AdSyncService)에서 진단 전체·순서·주소 제거·토큰 미포함 확인. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ from .security.redact import redact_text
|
||||
logger = logging.getLogger("performance.ad_sync")
|
||||
|
||||
AD_NS = "ad:" # 광고 인증정보 암호문 이름 공간(credentials.aad_for)
|
||||
AD_MESSAGE_MAX = 1200 # 광고 연동 오류 문구 길이 한도(비밀값 가린 뒤)
|
||||
_locks: dict[str, threading.Lock] = {}
|
||||
_locks_guard = threading.Lock()
|
||||
|
||||
@@ -57,7 +58,8 @@ class AdSyncService:
|
||||
@staticmethod
|
||||
def _message(exc: Exception, ctx: AdapterContext) -> str:
|
||||
known = getattr(ctx.credentials, "known_secrets", lambda: [])()
|
||||
return redact_text(str(getattr(exc, "message", "") or exc), known)
|
||||
# 광고 연동 오류는 고칠 곳 안내·진단이 붙어 길다 — 기본 300자에서 자르면 안내가 잘린다(2026-10-16 메타 #200 진단)
|
||||
return redact_text(str(getattr(exc, "message", "") or exc), known, max_len=AD_MESSAGE_MAX)
|
||||
|
||||
def test_connection(self, code: str, *, values: dict[str, str] | None = None, user: str = "",
|
||||
cleared: set[str] | None = None) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user