Skip to main content

Overview

Integrate AgentCat with Sentry for error tracking and performance monitoring. Events are sent as logs, and optionally as transactions for performance analysis.

Prerequisites

  1. A Sentry project with a DSN (Data Source Name)
  2. DSN can be found in your Sentry project settings under “Client Keys (DSN)”
A DSN looks like https://a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6@o123456.ingest.us.sentry.io/789. The examples below read it from a SENTRY_DSN environment variable rather than hardcoding it.

Configuration

In PHP, without environment the events carry no environment tag, and an invalid DSN logs one line and AgentCat skips that exporter. In C#, the DSN is the constructor argument, and Environment, Release and EnableTracing are properties. Without Environment, the events carry no environment tag. An invalid DSN logs Failed to initialize exporter <name>: Error: Invalid Sentry DSN: …, and AgentCat skips that exporter only. In this line and in every other AgentCat log line, the key part of the DSN, between :// and @, is replaced by ***.

Configuration Fields

Field Mapping

Trace and Event IDs

Log Events

All events are sent as logs with the following structure:

Transaction Events

Transaction events are only sent when enableTracing is set to true in the configuration.

Tags

Events include the following tags for filtering and grouping:

Extra Data

Additional context fields stored with events:

Error Events

When is_error is true, Sentry receives:
  1. A log event (always sent)
  2. A transaction event (if enableTracing is true)
  3. A separate error event for the Issues tab
This ensures proper error tracking, alerting, and issue management in Sentry.