Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
ENG-1926
Browse files Browse the repository at this point in the history
  • Loading branch information
meenal-developer committed Feb 15, 2024
1 parent b01979b commit 15a8253
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 2 deletions.
88 changes: 88 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middleware.io/node-apm",
"version": "1.2.11",
"version": "1.2.12",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand All @@ -17,6 +17,7 @@
"@opentelemetry/exporter-metrics-otlp-grpc": "^0.35.0",
"@opentelemetry/exporter-trace-otlp-grpc": "^0.41.0",
"@opentelemetry/instrumentation-grpc": "^0.32.0",
"@opentelemetry/instrumentation-mongoose": "^0.35.0",
"@opentelemetry/propagator-b3": "^1.1.1",
"@opentelemetry/resources": "^1.2.0",
"@opentelemetry/sdk-logs": "^0.44.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/tracer-collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports.init = (config) => {
const api = require('@opentelemetry/api');
const { CompositePropagator } = require('@opentelemetry/core');
const { B3Propagator, B3InjectEncoding } = require('@opentelemetry/propagator-b3');
const { MongooseInstrumentation } = require('@opentelemetry/instrumentation-mongoose');
api.propagation.setGlobalPropagator(
new CompositePropagator({
propagators: [
Expand All @@ -28,7 +29,8 @@ module.exports.init = (config) => {
getNodeAutoInstrumentations({}),
new GrpcInstrumentation({
ignoreGrpcMethods:["Export"]
})
}),
new MongooseInstrumentation(),
],
});
sdk.addResource(new Resource({
Expand Down

0 comments on commit 15a8253

Please sign in to comment.