Skip to main content
Version: Next

Sentry

Sentry project error-events source.

Description​

Reads one project's error events using GET /api/0/projects/{organization}/{project}/events/. Use this source to analyze error events in an external warehouse. The existing Sentry sink and its DSN authentication are unchanged.

Key Features​

  • Batch
  • Streaming
  • Exactly-once

Only BATCH mode and parallelism 1 are supported. The source reads an explicit time window. The engine-injected failure policy must be FAIL_FAST; continuing other tables is not supported by this single-project source. It does not discover projects, read traces or attachments, or create an immutable snapshot.

Prerequisites​

Create a bearer token with project:read access to the chosen project. A sink DSN cannot read events. For a regional or self-hosted deployment, set its HTTPS origin in api_base_url. Redirects are rejected; configure the final API origin directly. TLS certificate verification remains enabled. HTTP is supported only for fixtures with mock_mode=true and the literal dummy token="mock-token".

See the events API and pagination contract.

Reading and Recovery Contract​

Provide absolute RFC3339 start_time and end_time with an offset, and start strictly before end. Both are normalized to UTC and sent on every page. The source sends full=false and sample=false; content contains the returned summary event, not a full stack trace. page_size maps to Sentry's per_page parameter.

Pagination follows only the rel="next" link whose results="true"; a next link with results="false" completes the read. Only its cursor is copied into the next request. The configured origin, endpoint and time bounds are never replaced by the server's link. Missing/malformed pagination, repeated cursors, invalid rows, duplicate JSON object keys, oversized responses and exceeding max_pages fail the job instead of silently truncating it.

HTTP 429, 500, 502, 503, 504 and transport failures are retried within max_retries. Retry-After seconds and HTTP dates are respected. Delays exceeding 60 seconds fail so the job can be retried later; the connector never retries earlier than the server requests. Authentication failures and redirects are not retried. Closing the reader aborts in-flight requests and wakes retry waits. The timeout bounds HTTP I/O and schedules a per-attempt abort. Synchronous operating-system DNS resolution, JSON parsing and retry waits are not covered by a strict total job deadline.

Recovery replays the entire configured window; cursors are not durable snapshot offsets and are not checkpointed. The reader holds the checkpoint lock during the bounded read, so use manageable windows and suitable checkpoint timeouts. Rows already written to a nontransactional sink can be duplicated after a failed attempt. Configure downstream deduplication if needed. Sentry retention, delayed ingestion, event removal and changes while paginating can affect results. No complete-history, gap-free adjacent-window or snapshot-consistency guarantee is made.

Output Schema​

The schema is fixed; custom schema is not supported. All fields use STRING to preserve Sentry identifiers and timestamp representations.

FieldNullableMeaning
event_idnoeventID from the response
group_idyesgroupID
project_idyesprojectID
date_createdyesdateCreated, unchanged
titleyesEvent title
messageyesEvent message
platformyesEvent platform
contentnoComplete returned event object serialized as JSON

Missing optional fields become null. Unexpected types fail. JSON numeric values retain decimal precision, but content is not byte-identical to the HTTP response. Event content can contain personal data: use access-controlled sinks and avoid logging rows. The token option is masked by SeaTunnel's default parsed-configuration logging rules.

Options​

NameTypeRequiredDefaultDescription
tokenSTRINGyes-Bearer token with project read access
organizationSTRINGyes-Organization ID or slug
projectSTRINGyes-Project ID or slug
start_timeSTRINGyes-Absolute RFC3339 start
end_timeSTRINGyes-Absolute RFC3339 end
api_base_urlSTRINGnohttps://sentry.ioHTTPS origin without a path, query, fragment or trailing slash
page_sizeINTno100Events requested per page, 1–100
max_pagesINTno10000Page safety limit, 1–100000; fails when exceeded
max_retriesINTno3Additional transient attempts, 0–5
retry_delay_msINTno1000Minimum retry delay, 1–60000 ms
request_timeout_msINTno30000Per-attempt HTTP connection/socket timeout and abort deadline, 1–120000 ms
max_response_bytesINTno8388608Uncompressed body limit, 1024–16777216 bytes
mock_modeBOOLEANnofalsePermit an HTTP fixture with dummy token only

Source common options such as plugin_output remain available. Project names accept letters, digits, underscores and hyphens. query, full, sample, dsn and a custom schema are not source options.

Example​

Set the SENTRY_TOKEN and WAREHOUSE_PASSWORD environment variables before starting the job. The unquoted HOCON substitutions below resolve their values when the configuration is loaded.

env {
parallelism = 1
job.mode = "BATCH"
}
source {
Sentry {
plugin_output = "events"
token = ${SENTRY_TOKEN}
organization = "example"
project = "backend"
start_time = "2026-01-01T00:00:00Z"
end_time = "2026-01-02T00:00:00Z"
}
}
sink {
Jdbc {
plugin_input = "events"
url = "jdbc:postgresql://warehouse:5432/analytics"
driver = "org.postgresql.Driver"
user = "writer"
password = ${WAREHOUSE_PASSWORD}
database = "analytics"
table = "sentry_events"
generate_sink_sql = true
}
}

Create the destination table with the eight STRING-compatible columns above and install its JDBC driver. The integration test runs an engine job against a deterministic Sentry API fixture; it does not establish compatibility with every Sentry cloud or self-hosted release.

Changelog​

Change Log
ChangeCommitVersion
[improve] sentry options (#9261)https://github.com/apache/seatunnel/commit/4a2f3fa9152.3.11
[Feature][Restapi] Allow metrics information to be associated to logical plan nodes (#7786)https://github.com/apache/seatunnel/commit/6b7c53d03c2.3.9
[Improve] Remove use SeaTunnelSink::getConsumedType method and mark it as deprecated (#5755)https://github.com/apache/seatunnel/commit/8de74081002.3.4
[Improve][build] Give the maven module a human readable name (#4114)https://github.com/apache/seatunnel/commit/d7cd6010512.3.1
[Improve][Project] Code format with spotless plugin. (#4101)https://github.com/apache/seatunnel/commit/a2ab1665612.3.1
[Hotfix][OptionRule] Fix option rule about all connectors (#3592)https://github.com/apache/seatunnel/commit/226dc6a1192.3.0
[Improve][Connector-V2][Sentry] Unified exception for sentry sink connector (#3513)https://github.com/apache/seatunnel/commit/94b472b8062.3.0
[Connector][Dependency] Add Miss Dependency Cassandra And Change Kudu Plugin Name (#3432)https://github.com/apache/seatunnel/commit/6ac6a0a0cd2.3.0
[Feature][Sentry Sink V2] Add Sentry Sink Option Rules (#3318)https://github.com/apache/seatunnel/commit/850f4838162.3.0
[Feature][Connector-V2] Add sentry sink connector #2244 (#2584)https://github.com/apache/seatunnel/commit/9fd40390a72.2.0-beta