feat(blog): wire instrumentation — repo spans + use-case/controller withSpan + logger capture

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-07 00:18:13 +02:00
parent 64b6eb79d4
commit 5903cef70a
8 changed files with 506 additions and 111 deletions

View File

@@ -47,17 +47,15 @@ function resolveInstrumentation(): { tracer: ITracer; logger: ILogger } {
/**
* Production path: swap each feature's mock repository binding for the real
* Payload-backed one. Constructs `new XRepository(config, tracer, logger)` per
* feature once Phase E feature wiring lands. Until Phase E, this still calls
* the existing `bindProductionX(config)` signature; the unused `tracer`/`logger`
* are forwarded by Phase E commits as those binders are updated.
* feature as Phase E feature wiring lands (blog: task 18; remaining: tasks 1922).
*/
export async function bindAllProduction(): Promise<void> {
if (bound) return;
bound = true;
resolveInstrumentation(); // Rule 0
const { tracer, logger } = resolveInstrumentation(); // Rule 0
const resolvedConfig = await config;
bindProductionAuth(resolvedConfig);
bindProductionBlog(resolvedConfig);
bindProductionBlog(resolvedConfig, tracer, logger); // Phase E task 18
bindProductionMarketingPages(resolvedConfig);
bindProductionNavigation(resolvedConfig);
bindProductionMedia(resolvedConfig);
@@ -71,9 +69,9 @@ export async function bindAllProduction(): Promise<void> {
export async function bindAllDevSeed(): Promise<void> {
if (bound) return;
bound = true;
resolveInstrumentation(); // Rule 0
const { tracer, logger } = resolveInstrumentation(); // Rule 0
await bindDevSeedAuth();
await bindDevSeedBlog();
await bindDevSeedBlog(tracer, logger); // Phase E task 18
await bindDevSeedMarketingPages();
await bindDevSeedNavigation();
await bindDevSeedMedia();