BRN-29: OTel instrumentation for graphiti-api, reasoning-tools, brain-sync #1

Open
g1admin wants to merge 0 commits from brn-29/otel-instrumentation into main
Owner

Summary

Replicates the g1_otel.py pattern from knowledge-mcp (BRN-25) to three additional g1-brain services:

  • graphiti-api: init_otel() in lifespan, FastAPI + httpx auto-instrumentation
  • reasoning-tool (logic-lm): init_otel() before mcp.run(), httpx instrumentation
  • brain-sync: init_otel() at module level before FastAPI app creation

Changes per service

  • g1_otel.py shared module (graceful no-op when OTEL_ENABLED=false)
  • OTel pip deps in requirements.txt
  • Compose env vars: OTEL_ENABLED, OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY
  • Network access to svc-observe (f4o0gg0oocoog4ggo848oswc)

Compose files updated

  • compose/memory-stack.yml — graphiti-api service + observe network
  • compose/brain-mcp.yml — reasoning-tool service + observe network
  • brain-sync has no compose yet (not deployed)

Deploy notes

  • memory-stack uses build: directive → requires local rebuild + PATCH sync (Rule 59)
  • brain-mcp uses volume mount → Coolify restart after PATCH will pick up new deps via pip install
  • LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY must be set in .env files
## Summary Replicates the g1_otel.py pattern from knowledge-mcp (BRN-25) to three additional g1-brain services: - **graphiti-api**: `init_otel()` in lifespan, FastAPI + httpx auto-instrumentation - **reasoning-tool** (logic-lm): `init_otel()` before `mcp.run()`, httpx instrumentation - **brain-sync**: `init_otel()` at module level before FastAPI app creation ### Changes per service - `g1_otel.py` shared module (graceful no-op when OTEL_ENABLED=false) - OTel pip deps in `requirements.txt` - Compose env vars: OTEL_ENABLED, OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY - Network access to svc-observe (`f4o0gg0oocoog4ggo848oswc`) ### Compose files updated - `compose/memory-stack.yml` — graphiti-api service + observe network - `compose/brain-mcp.yml` — reasoning-tool service + observe network - brain-sync has no compose yet (not deployed) ### Deploy notes - memory-stack uses `build:` directive → requires local rebuild + PATCH sync (Rule 59) - brain-mcp uses volume mount → Coolify restart after PATCH will pick up new deps via pip install - LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY must be set in .env files
BRN-29: Add OTel instrumentation to graphiti-api, reasoning-tools, brain-sync
Some checks failed
Commit Summary / summarize (push) Failing after 7s
Sync reasoning-tools compose to Coolify / sync-coolify (push) Successful in 6s
Sync memory-stack compose to Coolify / sync-coolify (push) Successful in 6s
1a65f5f0f2
Replicate g1_otel.py pattern from knowledge-mcp (BRN-25) to three
additional g1-brain services:

- graphiti-api: init_otel() in lifespan, FastAPI + httpx auto-instrumentation
- reasoning-tool (logic-lm): init_otel() before mcp.run(), httpx instrumentation
- brain-sync: init_otel() at module level before FastAPI app creation

Each service gets:
- g1_otel.py shared module (no-op fallback when disabled)
- OTel pip dependencies in requirements.txt
- OTEL_ENABLED, OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT,
  LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY env vars in compose
- Network access to svc-observe (f4o0gg0oocoog4ggo848oswc)

Compose files updated: memory-stack.yml (graphiti-api), brain-mcp.yml
(reasoning-tool). brain-sync has no compose yet (not deployed).
Some checks are pending
Commit Summary / summarize (push) Failing after 7s
Sync reasoning-tools compose to Coolify / sync-coolify (push) Successful in 6s
Sync memory-stack compose to Coolify / sync-coolify (push) Successful in 6s
Compose Lint / lint
Required
Secret Scan / scan
Required
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin brn-29/otel-instrumentation:brn-29/otel-instrumentation
git switch brn-29/otel-instrumentation
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
generate-one/g1-brain!1
No description provided.