Skip to content

Commit

Permalink
feat: remove --enable-pprof flag, use --debug
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Oct 16, 2024
1 parent a3c7935 commit f2719e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const (
BallastSizeInBytesFlag = "ballast-size"
NumscriptCacheMaxCountFlag = "numscript-cache-max-count"
AutoUpgradeFlag = "auto-upgrade"
EnablePProfFlag = "enable-pprof"
)

func NewServeCommand() *cobra.Command {
Expand All @@ -50,7 +49,6 @@ func NewServeCommand() *cobra.Command {
return err
}

enablePProf, _ := cmd.Flags().GetBool(EnablePProfFlag)
otelMetricsExporter, _ := cmd.Flags().GetString(otlpmetrics.OtelMetricsExporterFlag)

options := []fx.Option{
Expand Down Expand Up @@ -90,7 +88,7 @@ func NewServeCommand() *cobra.Command {
) chi.Router {
return assembleFinalRouter(
otelMetricsExporter == "memory",
enablePProf,
service.IsDebug(cmd),
params.MeterProvider,
params.Exporter,
params.HealthController,
Expand All @@ -109,7 +107,6 @@ func NewServeCommand() *cobra.Command {
cmd.Flags().Uint(NumscriptCacheMaxCountFlag, 1024, "Numscript cache max count")
cmd.Flags().Bool(AutoUpgradeFlag, false, "Automatically upgrade all schemas")
cmd.Flags().String(BindFlag, "0.0.0.0:3068", "API bind address")
cmd.Flags().Bool(EnablePProfFlag, false, "Enable pprof")

service.AddFlags(cmd.Flags())
bunconnect.AddFlags(cmd.Flags())
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ services:
environment:
GOWORK: off
DEBUG: "true"
ENABLE_PPROF: "true"
OTEL_SERVICE_NAME: ledger
OTEL_METRICS_EXPORTER: "memory"
OTEL_TRACES_EXPORTER: otlp
Expand Down

0 comments on commit f2719e6

Please sign in to comment.