From ea332b10fdf8a3de92aeb6a366b3fc39ea19e2e1 Mon Sep 17 00:00:00 2001 From: Kemal Hadimli Date: Fri, 9 Jan 2026 10:00:52 +0000 Subject: [PATCH 1/2] feat: Add Sentry option to spec --- managedplugin/plugin.go | 3 +++ specs/destination.go | 3 +++ specs/source.go | 3 +++ 3 files changed, 9 insertions(+) diff --git a/managedplugin/plugin.go b/managedplugin/plugin.go index 49ef3fc9..d04434ea 100644 --- a/managedplugin/plugin.go +++ b/managedplugin/plugin.go @@ -77,6 +77,7 @@ type Config struct { Version string Environment []string // environment variables to pass to the plugin in key=value format DockerAuth string + SentryDSN string } type Client struct { @@ -549,6 +550,8 @@ func (c *Client) getPluginArgs() []string { } if c.noSentry { args = append(args, "--no-sentry") + } else if len(c.config.SentryDSN) > 0 { + args = append(args, "--sentry-dsn", c.config.SentryDSN) } if c.licenseFile != "" { args = append(args, "--license", c.licenseFile) diff --git a/specs/destination.go b/specs/destination.go index 6ae75ebd..3db8c01d 100644 --- a/specs/destination.go +++ b/specs/destination.go @@ -21,6 +21,9 @@ type Destination struct { BatchSizeBytes int `json:"batch_size_bytes,omitempty"` Spec any `json:"spec,omitempty"` PKMode PKMode `json:"pk_mode,omitempty"` + + // SentryDSN is the DSN used to report errors to Sentry + SentryDSN string `json:"sentry_dsn,omitempty"` } func (d *Destination) SetDefaults(defaultBatchSize, defaultBatchSizeBytes int) { diff --git a/specs/source.go b/specs/source.go index 048c9a0f..d8cb5666 100644 --- a/specs/source.go +++ b/specs/source.go @@ -53,6 +53,9 @@ type Source struct { // DeterministicCQID is a flag that indicates whether the source plugin should generate a random UUID as the value of _cq_id // or whether it should calculate a UUID that is a hash of the primary keys (if they exist) or the entire resource. DeterministicCQID bool `json:"deterministic_cq_id,omitempty"` + + // SentryDSN is the DSN used to report errors to Sentry + SentryDSN string `json:"sentry_dsn,omitempty"` } func (s *Source) SetDefaults() { From 6e12d05766f14f817ecd25e19cb4345f04627630 Mon Sep 17 00:00:00 2001 From: Kemal Hadimli Date: Fri, 9 Jan 2026 10:17:38 +0000 Subject: [PATCH 2/2] no need to edit specs here --- specs/destination.go | 3 --- specs/source.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/specs/destination.go b/specs/destination.go index 3db8c01d..6ae75ebd 100644 --- a/specs/destination.go +++ b/specs/destination.go @@ -21,9 +21,6 @@ type Destination struct { BatchSizeBytes int `json:"batch_size_bytes,omitempty"` Spec any `json:"spec,omitempty"` PKMode PKMode `json:"pk_mode,omitempty"` - - // SentryDSN is the DSN used to report errors to Sentry - SentryDSN string `json:"sentry_dsn,omitempty"` } func (d *Destination) SetDefaults(defaultBatchSize, defaultBatchSizeBytes int) { diff --git a/specs/source.go b/specs/source.go index d8cb5666..048c9a0f 100644 --- a/specs/source.go +++ b/specs/source.go @@ -53,9 +53,6 @@ type Source struct { // DeterministicCQID is a flag that indicates whether the source plugin should generate a random UUID as the value of _cq_id // or whether it should calculate a UUID that is a hash of the primary keys (if they exist) or the entire resource. DeterministicCQID bool `json:"deterministic_cq_id,omitempty"` - - // SentryDSN is the DSN used to report errors to Sentry - SentryDSN string `json:"sentry_dsn,omitempty"` } func (s *Source) SetDefaults() {