Skip to content

Commit

Permalink
add request tracing at debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
nicpottier committed May 12, 2018
1 parent 80558cd commit 9ff861d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/rp-archiver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/session"
aws_s3 "github.com/aws/aws-sdk-go/service/s3"
"github.com/evalphobia/logrus_sentry"
Expand Down Expand Up @@ -62,6 +63,9 @@ func main() {
if err != nil {
log.WithError(err).Fatal("error creating s3 client")
}
s3Session.Handlers.Send.PushFront(func(r *request.Request) {
log.WithField("headers", r.HTTPRequest.Header).WithField("service", r.ClientInfo.ServiceName).WithField("operation", r.Operation).WithField("params", r.Params).Debug("making aws request")
})

s3Client := aws_s3.New(s3Session)

Expand Down

0 comments on commit 9ff861d

Please sign in to comment.