Skip to content

Commit

Permalink
fix: pass resourceDetectors
Browse files Browse the repository at this point in the history
  • Loading branch information
mhassan1 committed Nov 11, 2022
1 parent 04d251b commit 1da1280
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ const globalResource = new Resource({

const sdk = new NodeSDK({
autoDetectResources: false,
resourceDetectors: [envDetector, processDetector, instanaAgentDetector],
resource: globalResource,
});

(async () => {
await sdk.detectResources({
detectors: [envDetector, processDetector, instanaAgentDetector],
});
await sdk.detectResources();

await sdk.start();
}());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ describe('[Integration] instanaAgentDetector', () => {

const sdk = new NodeSDK({
autoDetectResources: false,
resourceDetectors: [envDetector, processDetector, instanaAgentDetector],
resource: globalResource,
});

// attributes are automatically merged!
await sdk.detectResources({
detectors: [envDetector, processDetector, instanaAgentDetector],
});
await sdk.detectResources();

const resource = sdk['_resource'];

Expand Down

0 comments on commit 1da1280

Please sign in to comment.