aws / aws-xray-sdk-go

AWS X-Ray SDK for the Go programming language.
Apache License 2.0
276 stars 117 forks source link

Make AWS SDK v1 and v2 instrumentation examples more consistent #370

Closed jj22ee closed 2 years ago

jj22ee commented 2 years ago

Addresses issue https://github.com/aws/aws-xray-sdk-go/issues/368

Description of changes: The instrumentation example for AWS SDK v1 did not include segment creation while the example for AWS SDK v2 did include segment creation. This made it seem as if segment creation is necessary in one version and not in the other, which is not the case.

Both instrumentation examples are now made to both create a segment, with a disclaimer that segment creation may not be necessary when segments are bootstrapped automatically.

Tabs are also changed to double spaces for more consistency as well.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

DanielBauman88 commented 2 years ago

I think this change switched tabs to spaces which is not how gofmt / go-code should be formatted. Do you think it would be better to keep tabs?