Skip to content

Commit

Permalink
Add tracing for http server
Browse files Browse the repository at this point in the history
  • Loading branch information
acevedosharp committed Dec 3, 2024
1 parent 1c1d1f0 commit ddfcca1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ func StartGrpcServer(fs *feast.FeatureStore, host string, port int, writeLoggedF
// Go does not allow direct assignment to package-level functions as a way to
// mock them for tests
func StartHttpServer(fs *feast.FeatureStore, host string, port int, writeLoggedFeaturesCallback logging.OfflineStoreWriteCallback, loggingOpts *logging.LoggingOptions) error {
if strings.ToLower(os.Getenv("ENABLE_DATADOG_TRACING")) == "true" {
tracer.Start(tracer.WithRuntimeMetrics())
defer tracer.Stop()
}
loggingService, err := constructLoggingService(fs, writeLoggedFeaturesCallback, loggingOpts)
if err != nil {
return err
Expand Down

0 comments on commit ddfcca1

Please sign in to comment.