fix: Observability Resources tab always empty — span name mismatch and session isolation#3977
fix: Observability Resources tab always empty — span name mismatch and session isolation#3977ecthelion77 wants to merge 1 commit intoIBM:mainfrom
Conversation
|
Thanks @ecthelion77 identifying the span name mismatch issue!. PR #4050 (merged April 8) refactored the observability API and already fixed the session isolation issue you addressed. Please rebase and simplify to only rename "invoke.resource" → "resource.read" in these 5 places:
Remove all session management changes - the new API handles this automatically: Once resolved, this can be reviewed. |
a48a816 to
36194d4
Compare
|
Thanks @vishu-bh for the detailed review! Done — rebased on
Single commit, single file, 5 line changes. Ready for review. |
|
Suggested labels: |
36194d4 to
9d1a354
Compare
vishu-bh
left a comment
There was a problem hiding this comment.
Changes are clean. Thanks @ecthelion77 for addressing the bug. LGTM
9d1a354 to
6217a1a
Compare
37792e9 to
402bb6c
Compare
…urce.read Signed-off-by: Olivier Gintrand <olivier.gintrand@forterro.com>
402bb6c to
07da8d6
Compare
🐛 Bug-fix PR
📌 Summary
The admin Observability dashboard's Resources and Prompts tabs always show "No data" despite resources being fetched and prompts being rendered. This is caused by two independent bugs.
Supersedes #3970 (which only addressed the span name, not the session issue).
Fixes #3969
🐞 Root Cause
Bug 1 — Span name mismatch in
invoke_resource():invoke_resource()creates spans named"invoke.resource"["resource.read", "resources.read", "resource.fetch"]"invoke.resource"matches none of these"Created resource.read span"— the correct name was intendedBug 2 — DB session conflict in
start_span():prompt_service.pyandresource_service.pyuse the handler'sdbsession forstart_span()resource_service.pyalready usesfresh_db_session()forend_span(), butstart_span()was missedprompt_service.pyusesdbfor bothstart_span()andend_span()💡 Fix Description
Rename
"invoke.resource"→"resource.read"in 5 places withininvoke_resource(): database span, OpenTelemetry span, input/output capture checks, debug logWrap all
start_span()andend_span()calls withfresh_db_session()context manager in bothresource_service.pyandprompt_service.py, matching the pattern already established ininvoke_resource()'send_spanblock🧪 Verification
make lintmake test"invoke.resource"📐 MCP Compliance
✅ Checklist
make black isort pre-commit)