Skip to content

Commit

Permalink
doc: add usage to README.md of gcp detector (#2002)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Marchaud <[email protected]>
  • Loading branch information
weyert and vmarchaud authored Mar 24, 2021
1 parent 69f2d3c commit 3b13b5b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/opentelemetry-resource-detector-gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ npm install --save @opentelemetry/resource-detector-gcp

## Usage

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

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

## Useful links

Expand Down

0 comments on commit 3b13b5b

Please sign in to comment.