Skip to content

Commit

Permalink
add trace context
Browse files Browse the repository at this point in the history
  • Loading branch information
pulak-opti committed Jan 19, 2024
1 parent c07acc0 commit 055831a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/handlers/get_datafile.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func GetDatafile(w http.ResponseWriter, r *http.Request) {

logger := middleware.GetLogger(r)

datafile := optlyClient.GetOptimizelyConfig().GetDatafile()
datafile := optlyClient.WithTraceContext(r.Context()).GetOptimizelyConfig().GetDatafile()
var raw map[string]interface{}
if err = json.Unmarshal([]byte(datafile), &raw); err != nil {
RenderError(err, http.StatusInternalServerError, w, r)
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/get_datafile_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* Copyright 2021,2023-2024 Optimizely, Inc. and contributors *
* Copyright 2021,2023 Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/optimizely_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func OptimizelyConfig(w http.ResponseWriter, r *http.Request) {

logger := middleware.GetLogger(r)

conf := optlyClient.GetOptimizelyConfig()
conf := optlyClient.WithTraceContext(r.Context()).GetOptimizelyConfig()
logger.Info().Msg("Successfully returned OptimizelyConfig")
render.JSON(w, r, conf)
}

0 comments on commit 055831a

Please sign in to comment.