Skip to content

Commit

Permalink
changed readme to show updated detector name
Browse files Browse the repository at this point in the history
  • Loading branch information
abhee11 committed Mar 3, 2022
1 parent 27e3ab5 commit 607d0fd
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OpenTelemetry Resource Detector for AWS
# OpenTelemetry Resource Detector for Docker

[![NPM Published Version][npm-img]][npm-url]
[![dependencies][dependencies-image]][dependencies-url]
Expand All @@ -21,17 +21,17 @@ npm install --save @opentelemetry/resource-detector-docker

```typescript
import { detectResources } from '@opentelemetry/resources';
import { dockerCGroupDetector } from '@opentelemetry/resource-detector-docker'
import { dockerCGroupV1Detector } from '@opentelemetry/resource-detector-docker'
const resource = await detectResources({
detectors: [dockerCGroupDetector],
detectors: [dockerCGroupV1Detector],
})

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

## Available detectors

- `dockerCGroupDetector`: Populates `container.id` for processes running on docker cgroup v1
- `dockerCGroupV1Detector`: Populates `container.id` for processes running on docker cgroup v1

## Useful links

Expand Down

0 comments on commit 607d0fd

Please sign in to comment.