Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- DispatchQueryPlan previously did not try to use the singleflight middleware for check calls. (https://github.com/authzed/spicedb/pull/3119)
- Fixed regression introduced in 1.53.0. Postgres `HeadRevision` no longer allocates a new transaction ID on every call (https://github.com/authzed/spicedb/pull/3127)
- Fixed regression introduced in 1.53.0 for MySQL migration scripts (https://github.com/authzed/spicedb/pull/3129)
- Tracing: When server is shutting down, flush traces. Also, elide the need for setting `OTEL_EXPORTER_OTLP_ENDPOINT`. (https://github.com/authzed/spicedb/pull/3108)

## [1.53.0] - 2026-05-13
### Added
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.memdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=false"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
otel-collector:
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=false"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
migrate:
Expand Down Expand Up @@ -116,7 +117,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=true"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
migrate:
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.pgbouncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=false"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_DATASTORE_FOLLOWER_READ_DELAY_DURATION=2000ms"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
- "SPICEDB_DATASTORE_INCLUDE_QUERY_PARAMETERS_IN_TRACES=true"
Expand Down Expand Up @@ -204,7 +205,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=true"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_DATASTORE_FOLLOWER_READ_DELAY_DURATION=2000ms"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
- "SPICEDB_DATASTORE_INCLUDE_QUERY_PARAMETERS_IN_TRACES=true"
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=false"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_DATASTORE_FOLLOWER_READ_DELAY_DURATION=2000ms"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
Expand Down Expand Up @@ -150,7 +151,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=true"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_DATASTORE_FOLLOWER_READ_DELAY_DURATION=2000ms"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.spanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=false"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
migrate:
Expand Down Expand Up @@ -117,7 +118,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=true"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
migrate:
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=false"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
migrate:
Expand Down Expand Up @@ -112,7 +113,8 @@ services:
- "SPICEDB_GRPC_LOG_REQUESTS_ENABLED=true"
- "SPICEDB_GRPC_LOG_RESPONSES_ENABLED=false"
- "SPICEDB_STREAMING_API_RESPONSE_DELAY_TIMEOUT=0s"
- "OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317"
- "SPICEDB_OTEL_ENDPOINT=otel-collector:4317"
- "SPICEDB_OTEL_INSECURE=true"
- "SPICEDB_ENABLE_PERFORMANCE_INSIGHT_METRICS=true"
depends_on:
migrate:
Expand Down
30 changes: 0 additions & 30 deletions docs/spicedb.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ require (
github.com/wasilibs/go-pgquery v0.0.0-20250409022910-10ac41983c07
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0
go.opentelemetry.io/contrib/propagators/b3 v1.20.0
go.opentelemetry.io/contrib/propagators/ot v1.20.0
go.opentelemetry.io/otel v1.43.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0
go.opentelemetry.io/otel/exporters/prometheus v0.62.0
go.opentelemetry.io/otel/sdk v1.43.0
go.opentelemetry.io/otel/sdk/metric v1.43.0
Expand Down Expand Up @@ -247,11 +251,7 @@ require (
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.43.0 // indirect
go.opentelemetry.io/contrib/propagators/b3 v1.20.0 // indirect
go.opentelemetry.io/contrib/propagators/ot v1.20.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.43.0 // indirect
go.opentelemetry.io/otel/metric v1.43.0 // indirect
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
Expand Down
10 changes: 3 additions & 7 deletions pkg/cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

"github.com/fatih/color"
"github.com/jzelinskie/cobrautil/v2"
"github.com/jzelinskie/cobrautil/v2/cobraotel"
"github.com/spf13/cobra"

"github.com/authzed/spicedb/internal/telemetry"
Expand Down Expand Up @@ -214,11 +213,8 @@
return fmt.Errorf("could not register stored schema cache flags: %w", err)
}

tracingFlags := nfs.FlagSet(BoldBlue("Tracing"))
// Flags for tracing
// NOTE: cobraotel.New takes service name as an arg rather than command name.
otel := cobraotel.New("spicedb")
otel.RegisterFlags(tracingFlags)
server.RegisterOTelFlags(cmd, &config.OTel)

loggingFlagSet := nfs.FlagSet(BoldBlue("Logging"))
loggingFlagSet.BoolVar(&config.EnableRequestLogs, "grpc-log-requests-enabled", false, "enable logging of API request payloads")
Expand Down Expand Up @@ -260,14 +256,14 @@
Long: "start a SpiceDB server",
PreRunE: server.DefaultPreRunE(programName),
RunE: termination.PublishError(func(cmd *cobra.Command, args []string) error {
server, err := config.Complete(cmd.Context())
srv, err := config.Complete(cmd.Context())

Check warning on line 259 in pkg/cmd/serve.go

View check run for this annotation

Codecov / codecov/patch

pkg/cmd/serve.go#L259

Added line #L259 was not covered by tests
if err != nil {
return err
}
signalctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop()

return server.Run(signalctx)
return srv.Run(signalctx)

Check warning on line 266 in pkg/cmd/serve.go

View check run for this annotation

Codecov / codecov/patch

pkg/cmd/serve.go#L266

Added line #L266 was not covered by tests
}),
Example: server.ServeExample(programName),
}
Expand Down
8 changes: 2 additions & 6 deletions pkg/cmd/server/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
grpclog "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/selector"
"github.com/jzelinskie/cobrautil/v2"
"github.com/jzelinskie/cobrautil/v2/cobraotel"
"github.com/jzelinskie/cobrautil/v2/cobraproclimits"
"github.com/jzelinskie/cobrautil/v2/cobrazerolog"
"github.com/prometheus/client_golang/prometheus"
Expand Down Expand Up @@ -66,8 +65,8 @@ func ServeExample(programName string) string {
)
}

// DefaultPreRunE sets up viper, zerolog, and OpenTelemetry flag handling for a
// command.
// DefaultPreRunE sets up viper dotenv loading, zerolog, memory and process
// limits, release version checks, and runtime instrumentation for a command.
func DefaultPreRunE(programName string) cobrautil.CobraRunFunc {
return cobrautil.CommandStack(
cobrautil.SyncViperDotEnvPreRunE(programName, "spicedb.env", zerologr.New(&logging.Logger)),
Expand All @@ -82,9 +81,6 @@ func DefaultPreRunE(programName string) cobrautil.CobraRunFunc {
// and zero under the same load and 0.9
cobraproclimits.SetMemLimitRunE(memlimit.WithRatio(0.9)),
cobraproclimits.SetProcLimitRunE(),
cobraotel.New("spicedb",
cobraotel.WithLogger(zerologr.New(&logging.Logger)),
).RunE(),
releases.CheckAndLogRunE(),
runtime.RunE(),
)
Expand Down
Loading
Loading