feat: report traces to SigNoz via @agentage/observability - #110
Merged
Conversation
vreshch
force-pushed
the
feature/obs-kit
branch
from
August 8, 2026 02:17
f3dabd7 to
a150457
Compare
|
🎉 PR Validation ✅ PASSED Commit: Checks:
Visual Changes: 5 of 20 screenshots changed 📸 downloads dark desktop — 100% changed📸 downloads dark mobile — 100% changed📸 downloads light desktop — 100% changed📸 downloads light mobile — 100% changedReady to merge! ✨ 🔗 View workflow run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changed
Instruments diffractwd.com with
@agentage/observability, mirroring vreshch.com's already-merged setup (vreshch/vreshch.com#169):src/instrumentation.tsregisters the OTEL SDK via@agentage/observability/next(inert unless the OTEL env pair is set).package.jsonadds@agentage/observabilityand@vercel/otel.http://172.31.0.1:4318, service namediffractwd-web,service.namespace=side, 20% head sampling (OTEL_TRACES_SAMPLER_ARG=0.2). Metrics/logs exporters arenone— traces only.Deviation from the vreshch.com pattern (important)
diffractwd.com previously had no runtime-env delivery mechanism at all — no
.envwritten to the server, noenv_fileindocker-compose.yml, zero secrets ever passed to the container. vreshch.com already had this (forRESEND_API_KEY/contact-form vars) and this PR only appended the OTEL lines to its existing heredoc.This PR therefore adds the mechanism itself, net-new, structurally identical to vreshch.com's:
.github/workflows/deploy.ymlstep🔑 Write runtime env on server, placed after the compose/scriptscpstep and immediately before🚀 Deploy application(which runsdocker stack deploy). Itinstall -m 600s the 8OTEL_*lines to/opt/diffractwd-com/.envvia the samessh -i ~/.ssh/deploy_key root@${{ secrets.SERVER_HOST }}invocation this workflow already uses elsewhere (no new secret names introduced).docker-compose.yml'swebservice now hasenv_file: [.env], resolved relative to/opt/diffractwd-comwhere the stack is deployed from.Consequence: the deploy now requires
/opt/diffractwd-com/.envto exist beforedocker stack deployruns — that's exactly what the new step guarantees by always writing the file first, every deploy. If that step were ever skipped or failed silently,docker compose'senv_fileresolution would fail and abort the stack deploy, so the step is unconditional (not gated on secret presence).SIGNOZ_INGEST_TOKENis already set as a repo secret onvreshch/diffractwd.com(confirmed by the coordinator, not independently verified here per no-secrets-access constraint).Verify (local, in worktree)
npm run verify(tsc --noEmit && next lint && next build && vitest run) — all green:No deploy, no merge, no GitHub secrets touched — worktree-only change per standing policy.