Skip to content

Commit 6aba83a

Browse files
authored
Fix formatting for Go SDK docs (#153)
* Fix formatting for Go SDK docs * Update trace-manual-instr.mdx
1 parent eaf4e8c commit 6aba83a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/docs/getting-started/go-sdk/trace-manual-instr.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ OpenTelemetry Go SDK has AWS EC2, ECS and EKS resource detector support. The res
118118
is not running on an environment (EC2, ECS or EKS), then it will return an empty `resource` struct.
119119

120120
<img src={goImg5} alt="Diagram" style="margin: 30px 0;" />
121+
121122
Run `go get go.opentelemetry.io/contrib/detectors/aws/ec2` command to import the EC2 resource detector module. The following code snippet demonstrates how to use the EC2 resource detector. Visit OpenTelemetry AWS Resource Detectors [README](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/detectors/aws/README.md) to get more information on which environment attributes are being captured by resource detectors.
122123
```go lineNumbers=true
123124
// Instantiate a new EC2 Resource detector
@@ -158,12 +159,12 @@ otelaws.AppendMiddlewares(&cfg.APIOptions)
158159

159160
// Call to S3
160161
s3Client := s3.NewFromConfig(cfg)
161-
input := &s3.ListBucketsInput{}
162-
result, err := s3Client.ListBuckets(ctx, input)
163-
if err != nil {
164-
fmt.Printf("Got an error retrieving buckets, %v", err)
165-
return
166-
}
162+
input := &s3.ListBucketsInput{}
163+
result, err := s3Client.ListBuckets(ctx, input)
164+
if err != nil {
165+
fmt.Printf("Got an error retrieving buckets, %v", err)
166+
return
167+
}
167168
```
168169

169170
<SectionSeparator />

0 commit comments

Comments
 (0)