Skip to content

chore(mcp): remove unused observe_tool / observe_service decorators in favor of native fastmcp 3.x OTel spans #110

Description

@dougborg

Problem

frontapp_mcp_server/src/frontapp_mcp/logging.py:181,248 exports two decorators — observe_tool and observe_service — that are defined but unused anywhere in the tools surface (verified via grep -rln "observe_tool\|observe_service" frontapp_mcp_server/src/frontapp_mcp/tools/).

They mirror exactly the pattern stocktrim deleted in PR #157 (-731 LoC). Stocktrim found that fastmcp 3.x's native OTel span instrumentation covers everything the decorators did, while letting operators choose their own backend (Honeycomb, Datadog, Grafana, etc.) instead of being prescribed one.

Solution

After the fastmcp 3.x bump (#108):

  1. Delete observe_tool and observe_service from logging.py (and any related test code)
  2. Delete the __all__ exports
  3. Add a short frontapp_mcp_server/docs/observability.md describing how operators wire OpenTelemetry into the server (env vars, exporter configuration, sample setup)

Depends on

Files to change

  • frontapp_mcp_server/src/frontapp_mcp/logging.py — remove decorators + exports
  • frontapp_mcp_server/tests/ — delete any tests of the removed decorators
  • frontapp_mcp_server/docs/observability.md (new)

Acceptance criteria

  • No observe_tool / observe_service anywhere in frontapp_mcp_server/
  • uv run poe full-check passes
  • observability.md shows a working OTel export setup

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions