Skip to main content
Glama

sentry_start_transaction

Initiate performance monitoring transactions to track and analyze application operations like HTTP requests or database queries using specified name and operation type.

Instructions

Start a performance monitoring transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoTransaction description
nameYesTransaction name
opYesOperation type (e.g., 'http.request', 'db.query')

Implementation Reference

  • The handler for the 'sentry_start_transaction' tool. It ends any existing transaction, starts a new one using Sentry.startSpan with the provided name and op, stores it in currentTransaction, and returns a confirmation message.
    case "sentry_start_transaction": { const { name: transactionName, op, description } = args as any; if (currentTransaction) { currentTransaction.end(); } currentTransaction = Sentry.startSpan( { name: transactionName, op }, () => { // Transaction is active here return null; } ); return { content: [ { type: "text", text: `Transaction started: ${transactionName} (${op})`, }, ], }; }
  • The tool definition including name, description, and input schema for 'sentry_start_transaction' in the list of tools returned by ListToolsRequestHandler.
    { name: "sentry_start_transaction", description: "Start a performance monitoring transaction", inputSchema: { type: "object", properties: { name: { type: "string", description: "Transaction name", }, op: { type: "string", description: "Operation type (e.g., 'http.request', 'db.query')", }, description: { type: "string", description: "Transaction description", }, }, required: ["name", "op"], }, },
  • Global variable used to store the current active transaction/span, enabling the finish_transaction tool to end it.
    let currentTransaction: any | null = null;

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/diegofornalha/sentry-mcp-cursor'

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