Skip to main content
Glama
alilxxey

openobserve-community-mcp

get_latest_traces

Retrieve recent trace data from OpenObserve streams using Unix timestamps to monitor application performance and debug issues.

Instructions

Get the latest trace data from a trace stream. Time values are Unix timestamps in microseconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stream_nameYes
start_timeYes
end_timeYes
sizeNo
offsetNo
filter_queryNo
timeoutNo
include_rawNo

Implementation Reference

  • The actual implementation logic for the get_latest_traces tool in the client.
    def get_latest_traces(
        self,
        *,
        stream_name: str,
        start_time: int,
        end_time: int,
        offset: int = 0,
        size: int = 20,
        filter_query: str | None = None,
        timeout: int | None = None,
    ) -> Any:
        query: dict[str, str | int | float | bool] = {
            "from": offset,
            "size": size,
            "start_time": start_time,
            "end_time": end_time,
        }
        if filter_query:
            query["filter"] = filter_query
  • The tool registration and entry-point handler in the MCP server.
    def get_latest_traces(
        stream_name: str,
        start_time: int,
        end_time: int,
        size: int = 20,
        offset: int = 0,
        filter_query: str | None = None,
        timeout: int | None = None,
        include_raw: bool = False,
    ) -> dict[str, Any]:
        """Get the latest trace data from a trace stream. Time values are Unix timestamps in microseconds."""
        client = client_provider.get()
        raw = client.get_latest_traces(
            stream_name=stream_name,
            start_time=start_time,
            end_time=end_time,
            size=size,
            offset=offset,
            filter_query=filter_query,
            timeout=timeout,
        )

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/alilxxey/openobserve-community-mcp'

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