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:
2026-08-21 20:53:32 -07:00
parent 9e21ea17bb
commit 13cf9a30cb
291 changed files with 1565 additions and 1441 deletions
+25 -25
View File
@@ -1,4 +1,4 @@
// Package provider is Sentry's Terraform provider implementation,
// Package provider is Cairn OBS's Terraform provider implementation,
// built on HashiCorp's terraform-plugin-framework (not the legacy
// SDKv2 -- the framework is the actively-developed, currently-
// recommended library for a provider started from scratch, matching
@@ -17,22 +17,22 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types"
)
var _ provider.Provider = &sentryProvider{}
var _ provider.Provider = &cairnobsProvider{}
// New matches providerserver.Serve's expected constructor shape --
// version is threaded through from main.go's -ldflags-injected build
// version.
func New(version string) func() provider.Provider {
return func() provider.Provider {
return &sentryProvider{version: version}
return &cairnobsProvider{version: version}
}
}
type sentryProvider struct {
type cairnobsProvider struct {
version string
}
type sentryProviderModel struct {
type cairnobsProviderModel struct {
Endpoint types.String `tfsdk:"endpoint"`
AlertingEndpoint types.String `tfsdk:"alerting_endpoint"`
Token types.String `tfsdk:"token"`
@@ -42,7 +42,7 @@ type sentryProviderModel struct {
// req.ProviderData -- two separate clients, not one, because `alerting`
// is a genuinely separate service with its own base URL (its own
// REST API, its own port, sometimes its own deployment) -- same split
// web/src/lib/api.ts's apiBase/alertingBase and cli/cmd/sentryctl's
// web/src/lib/api.ts's apiBase/alertingBase and cli/cmd/cairnobsctl's
// --api/--alerting-api already draw, not something invented for this
// provider.
type providerData struct {
@@ -50,36 +50,36 @@ type providerData struct {
alerting *client
}
func (p *sentryProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse) {
resp.TypeName = "sentry"
func (p *cairnobsProvider) Metadata(_ context.Context, _ provider.MetadataRequest, resp *provider.MetadataResponse) {
resp.TypeName = "cairnobs"
resp.Version = p.version
}
func (p *sentryProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse) {
func (p *cairnobsProvider) Schema(_ context.Context, _ provider.SchemaRequest, resp *provider.SchemaResponse) {
resp.Schema = schema.Schema{
Description: "Manages Sentry log-aggregation-platform resources. Dashboards, alert rules, and notification targets for now -- tenant/RBAC resources are real, disclosed future work, not built in this pass; see the provider README.",
Description: "Manages Cairn OBS log-aggregation-platform resources. Dashboards, alert rules, and notification targets for now -- tenant/RBAC resources are real, disclosed future work, not built in this pass; see the provider README.",
Attributes: map[string]schema.Attribute{
"endpoint": schema.StringAttribute{
Optional: true,
Description: "Base URL of the api service, e.g. \"http://localhost:8080\". Defaults to " +
"$SENTRY_API_ENDPOINT, or \"http://localhost:8080\" if that's unset too -- same " +
"default sentryctl's --api/$SENTRYCTL_API_URL uses (cli/cmd/sentryctl/main.go).",
"$CAIRNOBS_API_ENDPOINT, or \"http://localhost:8080\" if that's unset too -- same " +
"default cairnobsctl's --api/$CAIRNOBSCTL_API_URL uses (cli/cmd/cairnobsctl/main.go).",
},
"alerting_endpoint": schema.StringAttribute{
Optional: true,
Description: "Base URL of the alerting service, e.g. \"http://localhost:8081\" -- a " +
"separate service from api, not a path under endpoint above (see " +
"/docs/phase-3-alerting-design.md's component boundary). Defaults to " +
"$SENTRY_ALERTING_API_ENDPOINT, or \"http://localhost:8081\" if that's unset too -- " +
"same default sentryctl's --alerting-api/$SENTRYCTL_ALERTING_API_URL uses.",
"$CAIRNOBS_ALERTING_API_ENDPOINT, or \"http://localhost:8081\" if that's unset too -- " +
"same default cairnobsctl's --alerting-api/$CAIRNOBSCTL_ALERTING_API_URL uses.",
},
"token": schema.StringAttribute{
Optional: true,
Sensitive: true,
Description: "Bearer credential sent as \"Authorization: Bearer <token>\" on every request " +
"-- required once a deployment configures enterprise-auth (see " +
"/docs/phase-4-rbac-design.md), same as sentryctl's $SENTRYCTL_TOKEN. Defaults to " +
"$SENTRY_API_TOKEN if unset. Set via a variable or environment, never a literal in a " +
"/docs/phase-4-rbac-design.md), same as cairnobsctl's $CAIRNOBSCTL_TOKEN. Defaults to " +
"$CAIRNOBS_API_TOKEN if unset. Set via a variable or environment, never a literal in a " +
".tf file committed to version control.",
},
},
@@ -87,11 +87,11 @@ func (p *sentryProvider) Schema(_ context.Context, _ provider.SchemaRequest, res
}
// Configure resolves endpoint/token the same precedence order
// sentryctl's resolveAPIURL/resolveToken use (explicit config value,
// cairnobsctl's resolveAPIURL/resolveToken use (explicit config value,
// then an environment variable, then a hardcoded default) so behavior
// stays predictable across both of this project's Sentry API clients.
func (p *sentryProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {
var config sentryProviderModel
// stays predictable across both of this project's Cairn OBS API clients.
func (p *cairnobsProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse) {
var config cairnobsProviderModel
resp.Diagnostics.Append(req.Config.Get(ctx, &config)...)
if resp.Diagnostics.HasError() {
return
@@ -99,7 +99,7 @@ func (p *sentryProvider) Configure(ctx context.Context, req provider.ConfigureRe
endpoint := config.Endpoint.ValueString()
if endpoint == "" {
endpoint = os.Getenv("SENTRY_API_ENDPOINT")
endpoint = os.Getenv("CAIRNOBS_API_ENDPOINT")
}
if endpoint == "" {
endpoint = "http://localhost:8080"
@@ -107,7 +107,7 @@ func (p *sentryProvider) Configure(ctx context.Context, req provider.ConfigureRe
alertingEndpoint := config.AlertingEndpoint.ValueString()
if alertingEndpoint == "" {
alertingEndpoint = os.Getenv("SENTRY_ALERTING_API_ENDPOINT")
alertingEndpoint = os.Getenv("CAIRNOBS_ALERTING_API_ENDPOINT")
}
if alertingEndpoint == "" {
alertingEndpoint = "http://localhost:8081"
@@ -115,7 +115,7 @@ func (p *sentryProvider) Configure(ctx context.Context, req provider.ConfigureRe
token := config.Token.ValueString()
if token == "" {
token = os.Getenv("SENTRY_API_TOKEN")
token = os.Getenv("CAIRNOBS_API_TOKEN")
}
data := &providerData{
@@ -126,7 +126,7 @@ func (p *sentryProvider) Configure(ctx context.Context, req provider.ConfigureRe
resp.ResourceData = data
}
func (p *sentryProvider) Resources(_ context.Context) []func() resource.Resource {
func (p *cairnobsProvider) Resources(_ context.Context) []func() resource.Resource {
return []func() resource.Resource{
newDashboardResource,
newDashboardPanelResource,
@@ -135,7 +135,7 @@ func (p *sentryProvider) Resources(_ context.Context) []func() resource.Resource
}
}
func (p *sentryProvider) DataSources(_ context.Context) []func() datasource.DataSource {
func (p *cairnobsProvider) DataSources(_ context.Context) []func() datasource.DataSource {
return []func() datasource.DataSource{
newDashboardDataSource,
newDashboardPanelDataSource,