File tree Expand file tree Collapse file tree 4 files changed +39
-19702
lines changed
examples/aws_driver_example Expand file tree Collapse file tree 4 files changed +39
-19702
lines changed Original file line number Diff line number Diff line change @@ -22,18 +22,16 @@ import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
2222import { AwsInstrumentation } from "@opentelemetry/instrumentation-aws-sdk" ;
2323import { AWSXRayIdGenerator } from "@opentelemetry/id-generator-aws-xray" ;
2424import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-grpc" ;
25- import { Resource } from "@opentelemetry/resources" ;
25+ import { resourceFromAttributes } from "@opentelemetry/resources" ;
2626import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions" ;
2727import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics" ;
2828import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-grpc" ;
2929import { AwsPGClient } from "../../pg" ;
3030
3131const traceExporter = new OTLPTraceExporter ( { url : "http://localhost:4317" } ) ;
32- const resource = Resource . default ( ) . merge (
33- new Resource ( {
34- [ ATTR_SERVICE_NAME ] : "aws-advanced-nodejs-wrapper"
35- } )
36- ) ;
32+ const resource = resourceFromAttributes ( {
33+ [ ATTR_SERVICE_NAME ] : "aws-advanced-nodejs-wrapper"
34+ } ) ;
3735
3836const metricReader = new PeriodicExportingMetricReader ( {
3937 exporter : new OTLPMetricExporter ( ) ,
Original file line number Diff line number Diff line change @@ -22,16 +22,14 @@ import { AWSXRayPropagator } from "@opentelemetry/propagator-aws-xray";
2222import { HttpInstrumentation } from "@opentelemetry/instrumentation-http" ;
2323import { AwsInstrumentation } from "@opentelemetry/instrumentation-aws-sdk" ;
2424import { AWSXRayIdGenerator } from "@opentelemetry/id-generator-aws-xray" ;
25- import { Resource } from "@opentelemetry/resources" ;
25+ import { resourceFromAttributes } from "@opentelemetry/resources" ;
2626import { ATTR_SERVICE_NAME } from "@opentelemetry/semantic-conventions" ;
2727import { PeriodicExportingMetricReader } from "@opentelemetry/sdk-metrics" ;
2828import { OTLPMetricExporter } from "@opentelemetry/exporter-metrics-otlp-grpc" ;
2929
30- const resource = Resource . default ( ) . merge (
31- new Resource ( {
32- [ ATTR_SERVICE_NAME ] : "aws-advanced-nodejs-wrapper"
33- } )
34- ) ;
30+ const resource = resourceFromAttributes ( {
31+ [ ATTR_SERVICE_NAME ] : "aws-advanced-nodejs-wrapper"
32+ } ) ;
3533
3634const metricReader = new PeriodicExportingMetricReader ( {
3735 exporter : new OTLPMetricExporter ( ) ,
You can’t perform that action at this time.
0 commit comments