Skip to content

Commit

Permalink
Merge branch 'main' into fix/aws-resource-detector-timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
arunp0 authored May 23, 2024
2 parents 0898fee + 0cef9fa commit bcc205b
Show file tree
Hide file tree
Showing 73 changed files with 773 additions and 560 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"clean": "rimraf build/*",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../../",
"compile": "npm run version:update && tsc -p .",
"compile": "tsc -p .",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"precompile": "tsc --version && lerna run version:update --scope @opentelemetry/resource-detector-container --include-dependencies",
Expand Down
31 changes: 14 additions & 17 deletions incubator/opentelemetry-sampler-aws-xray/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ const { AWSXRayPropagator } = require("@opentelemetry/propagator-aws-xray");
const { AWSXRayIdGenerator } = require("@opentelemetry/id-generator-aws-xray");


// Initialize resource, trace exporter, span processor, and ID generator
const _resource = Resource.default().merge(new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: "remote-sampler-app",
}));
// Initialize trace exporter, span processor, and ID generator
const _traceExporter = new OTLPTraceExporter();
const _spanProcessor = new BatchSpanProcessor(_traceExporter);
const _tracerConfig = {
Expand All @@ -32,19 +29,19 @@ const _tracerConfig = {
}

const sdk = new opentelemetry.NodeSDK({
textMapPropagator: new AWSXRayPropagator(),
instrumentations: [
new HttpInstrumentation(),
new AwsInstrumentation({
suppressInternalInstrumentation: true
}),
],
resource: _resource,
spanProcessor: _spanProcessor,
traceExporter: _traceExporter,
});

sdk.configureTracerProvider(_tracerConfig, _spanProcessor);
serviceName: "remote-sampler-app",
textMapPropagator: new AWSXRayPropagator(),
instrumentations: [
new HttpInstrumentation(),
new AwsInstrumentation({
suppressInternalInstrumentation: true
}),
],
spanProcessor: _spanProcessor,
traceExporter: _traceExporter,
});

sdk.configureTracerProvider(_tracerConfig, _spanProcessor);

```

Expand Down
4 changes: 2 additions & 2 deletions metapackages/auto-instrumentations-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector');
const { Resource } = require('@opentelemetry/resources');
const { SemanticResourceAttributes } = require('@opentelemetry/semantic-conventions');
const { SEMRESATTRS_SERVICE_NAME } = require('@opentelemetry/semantic-conventions');
const { SimpleSpanProcessor } = require('@opentelemetry/sdk-trace-base');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

const exporter = new CollectorTraceExporter();
const provider = new NodeTracerProvider({
resource: new Resource({
[SemanticResourceAttributes.SERVICE_NAME]: 'basic-service',
[SEMRESATTRS_SERVICE_NAME]: 'basic-service',
}),
});
provider.addSpanProcessor(new SimpleSpanProcessor(exporter));
Expand Down
Loading

0 comments on commit bcc205b

Please sign in to comment.