Skip to content

Commit

Permalink
feat: Update the example for report v2 integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
Google APIs authored and Copybara-Service committed Jul 12, 2021
1 parent acb4f89 commit c61a01d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions google/example/endpointsapis/goapp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ func report(w http.ResponseWriter, r *http.Request, name string, responseCode in
Time: received.UTC().Format(time.RFC3339),
},
Response: &servicecontrol.Response{
Time: time.Now().UTC().Format(time.RFC3339),
Code: responseCode,
BackendLatency: time.Duration(70) * time.Millisecond,
Time: time.Now().UTC().Format(time.RFC3339),
Code: responseCode,
Headers: map[string]string{
"x-backend-latency": "0.007",
},
},
Destination: &servicecontrol.Peer{
RegionCode: "us-central1",
Expand Down

0 comments on commit c61a01d

Please sign in to comment.