Skip to content

Commit

Permalink
doc: add usage example to aws detector (#2001)
Browse files Browse the repository at this point in the history
Co-authored-by: Bartlomiej Obecny <[email protected]>
Co-authored-by: Valentin Marchaud <[email protected]>
  • Loading branch information
3 people authored Mar 20, 2021
1 parent 24cc9ee commit 6025749
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/opentelemetry-resource-detector-aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ npm install --save @opentelemetry/resource-detector-aws

## Usage

> TODO
```typescript
import { detectResources } from '@opentelemetry/resources';
import { awsBeanstalkDetector } from '@opentelemetry/resource-detector-aws'
const resource = await detectResources({
detectors: [awsEc2Detector],
})

const tracerProvider = new NodeTracerProvider({ resource });
```

**Note**: Besides `awsEc2Detector` there are also the following detectors available: `awsBeanstalkDetector`, `awsEksDetector` and `awsEcsDetector`

## Useful links

Expand Down

0 comments on commit 6025749

Please sign in to comment.