Skip to main content
Glama

sentry_finish_transaction

Complete a transaction in Sentry by setting its final status, enabling performance monitoring and error tracking for application health.

Instructions

Finish the current transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoTransaction statusok

Implementation Reference

  • The handler function that executes the sentry_finish_transaction tool. It checks if there is an active transaction, ends it using currentTransaction.end(), clears the global currentTransaction variable, and returns a confirmation message.
    case "sentry_finish_transaction": { const { status = "ok" } = args as any; if (!currentTransaction) { throw new Error("No active transaction to finish"); } currentTransaction.end(); currentTransaction = null; return { content: [ { type: "text", text: `Transaction finished with status: ${status}`, }, ], }; }
  • src/index.ts:282-296 (registration)
    The registration of the sentry_finish_transaction tool in the ListTools response, including its name, description, and input schema definition.
    { name: "sentry_finish_transaction", description: "Finish the current transaction", inputSchema: { type: "object", properties: { status: { type: "string", description: "Transaction status", enum: ["ok", "cancelled", "unknown", "invalid_argument", "deadline_exceeded", "not_found", "already_exists", "permission_denied", "resource_exhausted", "failed_precondition", "aborted", "out_of_range", "unimplemented", "internal_error", "unavailable", "data_loss", "unauthenticated"], default: "ok", }, }, }, },
  • Global variable used to store the current Sentry transaction, shared between start_transaction and finish_transaction tools.
    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