Skip to content

fix: Observability Resources tab always empty — span name mismatch ("invoke.resource" vs "resource.read") #3969

@ecthelion77

Description

@ecthelion77

Bug Description

The Observability dashboard Resources tab always shows empty results, even when resources are actively being fetched by agents.

Root Cause

In resource_service.py, the invoke_resource() method creates observability spans named "invoke.resource":

# resource_service.py line ~1637
name="invoke.resource",

But the dashboard queries in admin.py filter for:

["resource.read", "resources.read", "resource.fetch"]

The span name "invoke.resource" does not match any of the expected names — so Resources metrics always return empty.

Interestingly, the debug log right after creating the span says "Created resource.read span", and the other read_resource() method in the same file already uses the correct "resource.read" name. Only invoke_resource() has the wrong name.

Expected Behavior

Resource spans should use "resource.read" (consistent with read_resource() and the dashboard queries).

Fix

Rename "invoke.resource" to "resource.read" in 3 places in invoke_resource():

  1. observability_service.start_span(name=...) — database span
  2. create_span(...) — OpenTelemetry span
  3. Logger debug message

Environment

  • ContextForge 1.0.0-RC2 (commit from main as of late March 2026)
  • PostgreSQL backend with observability enabled

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions