Skip to main content
Glama
instrumentation.py446 B
from __future__ import annotations from contextlib import contextmanager from typing import Optional from monitoring.telemetry import MetricsSink @contextmanager def instrument(sink: MetricsSink, op_name: str, success_counter: Optional[str] = None): t = sink.timer(f"latency.{op_name}") done = t.timeit() try: yield if success_counter: sink.counter(success_counter).inc(1) finally: done()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zazzles2908/EX_AI-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server