Rebrand: Sentry -> Cairn OBS
Full rebrand across cosmetic branding, code identifiers, and infrastructure/data-plane naming, using the supplied Cairn OBS logo package. Cosmetic: favicon/logo swap (also closes a stale license-audit finding -- the old favicon was SvelteKit's unreplaced scaffold logo), new centered welcome landing page, larger/legible sidebar logo, page titles, CLAUDE.md/README/docs prose. Code identifiers: Go module path github.com/sentry/sentry -> github.com/cairnobs/cairnobs across all 13 modules and ~91 files (protoc regenerated); Rust crates sentry-agent/sentry-parser/sentry-search -> cairnobs-*; CLI sentryctl -> cairnobsctl; Terraform provider fully renamed (sentry_dashboard etc. -> cairnobs_dashboard, provider type, env vars); every session/auth cookie name; agent config paths and Windows service identity. Deliberately preserved: the gRPC wire protocol's protobuf packages (sentry.logs.v1, sentry.agent.v1) and their Go import directory (proto/sentry/...) -- renaming the wire-level package would break every currently-deployed agent binary (confirmed two real hosts, including mail.inbuxa.com, are actively streaming through this exact contract) until rebuilt and redeployed in lockstep with an ingest cutover. Only the Go module path wrapping the generated code changes. Infrastructure: every docker-compose container name (root and three component-level compose files); the Helm chart (directory, Chart.yaml, named-template helpers, all templates, values.yaml image repos); Kubernetes Operator (CRD group sentry.io -> cairnobs.io, both CRD YAML files, Go identifiers, RBAC markers); the coupled enterprise/tenantcrd package. Caught and fixed real path-coupling bugs along the way: the Helm chart's search/ingest volume mounts and the dev-only-credential detection constant vs. docker-compose.yml's literal values had to move together or a security warning would have silently stopped firing. Data plane: Postgres database sentry_metadata -> cairnobs_metadata and role sentry -> cairnobs; ClickHouse database sentry -> cairnobs; Kafka topic sentry.logs.raw -> cairnobs.logs.raw and its consumer groups. Source-level defaults, docker-compose.yml, and every migrate.sh/ provision script default updated together; already-applied migration files left untouched per this repo's immutable-migration convention. Verified at every layer: all 13 Go modules build/vet/test clean, both Rust workspaces (agent, search) build/clippy/test clean, npm run check/ build clean, docker compose config validates on all four compose files. Live-verified against a real docker stack multiple times through this work, including a final fresh-volume run confirming the actual renamed Postgres database/role, ClickHouse database, and Kafka topic all work end to end with a real login and query, zero console errors.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
data "cairnobs_alert_rule" "checkout_5xx" {
|
||||
id = "an-existing-rule-id"
|
||||
}
|
||||
|
||||
output "checkout_5xx_notification_target" {
|
||||
value = data.cairnobs_alert_rule.checkout_5xx.notification_target_id
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
data "cairnobs_dashboard" "checkout_errors" {
|
||||
id = "an-existing-dashboard-id"
|
||||
}
|
||||
|
||||
output "checkout_errors_default_earliest" {
|
||||
value = data.cairnobs_dashboard.checkout_errors.default_earliest
|
||||
}
|
||||
+4
-4
@@ -1,16 +1,16 @@
|
||||
# secret comes back unredacted (see the sentry_notification_target
|
||||
# secret comes back unredacted (see the cairnobs_notification_target
|
||||
# resource's schema doc comment) -- this data source's "secret"
|
||||
# attribute is Sensitive for the same reason.
|
||||
data "sentry_notification_target" "ops_webhook" {
|
||||
data "cairnobs_notification_target" "ops_webhook" {
|
||||
id = "an-existing-target-id"
|
||||
}
|
||||
|
||||
resource "sentry_alert_rule" "checkout_5xx" {
|
||||
resource "cairnobs_alert_rule" "checkout_5xx" {
|
||||
name = "Checkout 5xx spike"
|
||||
query = "service=checkout status>=500 | stats count"
|
||||
condition_type = "threshold"
|
||||
comparator = "gt"
|
||||
threshold_value = 50
|
||||
eval_interval_seconds = 60
|
||||
notification_target_id = data.sentry_notification_target.ops_webhook.id
|
||||
notification_target_id = data.cairnobs_notification_target.ops_webhook.id
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
data "sentry_alert_rule" "checkout_5xx" {
|
||||
id = "an-existing-rule-id"
|
||||
}
|
||||
|
||||
output "checkout_5xx_notification_target" {
|
||||
value = data.sentry_alert_rule.checkout_5xx.notification_target_id
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
data "sentry_dashboard" "checkout_errors" {
|
||||
id = "an-existing-dashboard-id"
|
||||
}
|
||||
|
||||
output "checkout_errors_default_earliest" {
|
||||
value = data.sentry_dashboard.checkout_errors.default_earliest
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
sentry = {
|
||||
source = "registry.terraform.io/sentry/sentry"
|
||||
cairnobs = {
|
||||
source = "registry.terraform.io/cairnobs/cairnobs"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "sentry_api_token" {
|
||||
variable "cairnobs_api_token" {
|
||||
type = string
|
||||
default = null
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
provider "sentry" {
|
||||
# Both optional -- default to $SENTRY_API_ENDPOINT/$SENTRY_API_TOKEN,
|
||||
# then http://localhost:8080/no token, matching sentryctl's own
|
||||
# defaults (cli/cmd/sentryctl/main.go). token is only required once a
|
||||
provider "cairnobs" {
|
||||
# Both optional -- default to $CAIRNOBS_API_ENDPOINT/$CAIRNOBS_API_TOKEN,
|
||||
# then http://localhost:8080/no token, matching cairnobsctl's own
|
||||
# defaults (cli/cmd/cairnobsctl/main.go). token is only required once a
|
||||
# deployment turns on enterprise-auth enforcement.
|
||||
endpoint = "http://localhost:8080"
|
||||
token = var.sentry_api_token
|
||||
token = var.cairnobs_api_token
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
terraform import cairnobs_alert_rule.checkout_5xx <rule-id>
|
||||
+4
-4
@@ -1,10 +1,10 @@
|
||||
resource "sentry_notification_target" "ops_webhook" {
|
||||
resource "cairnobs_notification_target" "ops_webhook" {
|
||||
name = "Ops Webhook"
|
||||
kind = "webhook"
|
||||
webhook_url = "https://ops.example.com/hooks/sentry-alerts"
|
||||
webhook_url = "https://ops.example.com/hooks/cairnobs-alerts"
|
||||
}
|
||||
|
||||
resource "sentry_alert_rule" "checkout_5xx" {
|
||||
resource "cairnobs_alert_rule" "checkout_5xx" {
|
||||
name = "Checkout 5xx spike"
|
||||
query = "service=checkout status>=500 | stats count"
|
||||
condition_type = "threshold"
|
||||
@@ -12,7 +12,7 @@ resource "sentry_alert_rule" "checkout_5xx" {
|
||||
threshold_value = 50
|
||||
eval_interval_seconds = 60
|
||||
for_minutes = 5
|
||||
notification_target_id = sentry_notification_target.ops_webhook.id
|
||||
notification_target_id = cairnobs_notification_target.ops_webhook.id
|
||||
}
|
||||
|
||||
# Create/destroy only -- alerting has no PUT /rules/{id} today, so
|
||||
@@ -0,0 +1 @@
|
||||
terraform import cairnobs_dashboard.checkout_errors <dashboard-id>
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
resource "sentry_dashboard" "checkout_errors" {
|
||||
resource "cairnobs_dashboard" "checkout_errors" {
|
||||
name = "Checkout Errors"
|
||||
description = "5xx rate and latency for the checkout service"
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# "dashboard_id/panel_id" -- a bare panel id isn't enough to import
|
||||
# from, since Read needs the parent dashboard_id to know where to look
|
||||
# (there's no standalone GET for a single panel).
|
||||
terraform import sentry_dashboard_panel.error_rate <dashboard-id>/<panel-id>
|
||||
terraform import cairnobs_dashboard_panel.error_rate <dashboard-id>/<panel-id>
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
resource "sentry_dashboard" "checkout_errors" {
|
||||
resource "cairnobs_dashboard" "checkout_errors" {
|
||||
name = "Checkout Errors"
|
||||
}
|
||||
|
||||
resource "sentry_dashboard_panel" "error_rate" {
|
||||
dashboard_id = sentry_dashboard.checkout_errors.id
|
||||
resource "cairnobs_dashboard_panel" "error_rate" {
|
||||
dashboard_id = cairnobs_dashboard.checkout_errors.id
|
||||
title = "5xx rate over time"
|
||||
query = "service=checkout status>=500 | timechart count"
|
||||
viz_type = "line"
|
||||
@@ -13,7 +13,7 @@ resource "sentry_dashboard_panel" "error_rate" {
|
||||
height = 4
|
||||
}
|
||||
|
||||
# Unlike sentry_alert_rule/sentry_notification_target, this resource
|
||||
# Unlike cairnobs_alert_rule/cairnobs_notification_target, this resource
|
||||
# supports a real in-place update -- api/dashboards.Handler has a real
|
||||
# PUT /dashboards/{id}/panels/{panelId}. Only dashboard_id forces a
|
||||
# destroy-and-recreate (there's no API operation to move a panel between
|
||||
@@ -0,0 +1 @@
|
||||
terraform import cairnobs_notification_target.ops_webhook <target-id>
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
resource "sentry_notification_target" "ops_webhook" {
|
||||
resource "cairnobs_notification_target" "ops_webhook" {
|
||||
name = "Ops Webhook"
|
||||
kind = "webhook"
|
||||
webhook_url = "https://ops.example.com/hooks/sentry-alerts"
|
||||
webhook_url = "https://ops.example.com/hooks/cairnobs-alerts"
|
||||
|
||||
# Optional. Sensitive -- not printed in plan/apply output, but note
|
||||
# it's still stored in Terraform state in plaintext (alerting's own
|
||||
@@ -1 +0,0 @@
|
||||
terraform import sentry_alert_rule.checkout_5xx <rule-id>
|
||||
@@ -1 +0,0 @@
|
||||
terraform import sentry_dashboard.checkout_errors <dashboard-id>
|
||||
@@ -1 +0,0 @@
|
||||
terraform import sentry_notification_target.ops_webhook <target-id>
|
||||
Reference in New Issue
Block a user