Skip to content

Commit

Permalink
Fix segfault from using empty logger in stackdriver exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
lezh committed Dec 16, 2021
1 parent 2db4112 commit 2f9d0c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func newApp() (app *cli.App) {

cli.DurationFlag{
Name: "stackdriver-export-interval",
Value: 0,
Usage: "Export metrics to stackdriver with this interval. The default value 0 indicates no exporting.",
},

Expand Down
1 change: 0 additions & 1 deletion internal/monitor/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,5 @@ func CloseStackdriverExporter() {
exporter.StopMetricsExporter()
exporter.Flush()
}
infoLogger.Printf("Stackdriver exporter closed")
exporter = nil
}

0 comments on commit 2f9d0c3

Please sign in to comment.