Skip to content

Commit

Permalink
chore(detectors/node): cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kirrg001 committed Apr 12, 2023
1 parent 9b31a5f commit d7364fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
27 changes: 0 additions & 27 deletions detectors/node/opentelemetry-resource-detector-instana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,6 @@ const sdk = new NodeSDK({
sdk.start()
```

```typescript
import {
Resource,
processDetector,
envDetector,
} from "@opentelemetry/resources";
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
import { NodeSDK } from "@opentelemetry/sdk-node";
import { instanaAgentDetector } from "@opentelemetry/resource-detector-instana";

const globalResource = new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: "TestService",
});

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

sdk.start()

(async () => {
const resource = sdk["_resource"];
await resource.waitForAsyncAttributes?.();
}());
```

## Useful links

- For more information about Instana Agent, visit: <https://www.ibm.com/docs/en/instana-observability/current?topic=instana-host-agent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('[Integration] instanaAgentDetector', () => {
nock.cleanAll();
});

it('should return merged resource', async () => {
it('#1 should return merged resource', async () => {
const mockedReply = {
pid: 123,
agentUuid: '14:7d:da:ff:fe:e4:08:d5',
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('[Integration] instanaAgentDetector', () => {
scope.done();
});

it('[autoDetectResources:true] should return merged resource', async () => {
it('#2 should return merged resource', async () => {
const mockedReply = {
pid: 123,
agentUuid: '14:7d:da:ff:fe:e4:08:d5',
Expand Down

0 comments on commit d7364fc

Please sign in to comment.