Here’s my src/index.js code in Strapi 4.
‘use strict’;
module.exports = {
/**
- An asynchronous register function that runs before
- your application is initialized.
- This gives you an opportunity to extend code.
/
register(/{ strapi }*/) {
const tracer = require(‘dd-trace’).init({
debug: true,
runtimeMetrics: true,
logInjection: true
});},
/**
- An asynchronous bootstrap function that runs before
- your application gets started.
- This gives you an opportunity to set up your data model,
- run jobs, or perform some special logic.
/
bootstrap(/{ strapi }*/) {},
};
And here’s my code in Strapi 3 (where it’s working):
“use strict”;
if (
process.env.NODE_ENV === “production” ||
process.env.NODE_ENV === “staging”
) {
require(“dd-trace”).init();
}/**
- An asynchronous bootstrap function that runs before
- your application gets started.
- This gives you an opportunity to set up your data model,
- run jobs, or perform some special logic.
- See more details here: Configurations | Strapi Documentation
*/module.exports = () => {};
Any ideas?