New Relic implementation issue #6462
Unanswered
CerqueiraYYZ
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys im trying to use mesh with new relic but im having this issue
Here is the error
gqlmesh@1.0.0 start> mesh dev⚠️ 🕸️ Mesh - config 48:5:166mConfiguration file is not valid!⚠️ 🕸️ Mesh - config 48:5:166mThis is just a warning! It doesn't have any effects on runtime.⚠️ 🕸️ Mesh - config 48:5:166mError: must NOT have additional properties💥 🕸️ Mesh Error: Unable to load plugin matching newrelic while resolving @graphql-mesh/plugin-newrelic: Error: Cannot find module 'process/'Require stack:- /app/node_modules/readable-stream/lib/internal/streams/end-of-stream.js- /app/node_modules/readable-stream/lib/internal/streams/operators.js- /app/node_modules/readable-stream/lib/stream.js- /app/node_modules/readable-stream/lib/ours/index.js- /app/node_modules/newrelic/lib/util/logger.js- /app/node_modules/newrelic/lib/logger.js- /app/node_modules/newrelic/index.js- /app/node_modules/@graphql-mesh/plugin-newrelic/cjs/index.js- /app/node_modules/@graphql-mesh/utils/cjs/defaultImportFn.js- /app/node_modules/@graphql-mesh/utils/cjs/load-from-module-export-expression.js- /app/node_modules/@graphql-mesh/utils/cjs/read-file-or-url.js- /app/node_modules/@graphql-mesh/utils/cjs/index.js- /app/node_modules/@graphql-mesh/runtime/cjs/get-mesh.js- /app/node_modules/@graphql-mesh/runtime/cjs/index.js- /app/node_modules/@graphql-mesh/cli/cjs/index.js- /app/node_modules/@graphql-mesh/cli/cjs/bin.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1134:15) at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as resolveFilename] (/app/nodemodules/@cspotcode/source-map-support/source-map-support.js:811:30) at Function.Module._load (node:internal/modules/cjs/loader:975:27) at Module.require (node:internal/modules/cjs/loader:1225:19) at require (node:internal/modules/helpers:177:18) at Object.<anonymous> (/app/node_modules/readable-stream/lib/internal/streams/end-of-stream.js:3:17) at Module._compile (node:internal/modules/cjs/loader:1356:14) at Module._extensions..js (node:internal/modules/cjs/loader:1414:10) at Object.require.extensions.<computed> [as .js] (/app/node_modules/ts-node/src/index.ts:1608:43) at Module.load (node:internal/modules/cjs/loader:1197:32) at getPackage (/app/node_modules/@graphql-mesh/config/cjs/utils.js:50:23) at async /app/node_modules/@graphql-mesh/config/cjs/process.js:218:69 at async Promise.all (index 0) at async Promise.all (index 2) at async processConfig (/app/node_modules/@graphql-mesh/config/cjs/process.js:87:114) at async Object.handler (/app/node_modules/@graphql-mesh/cli/cjs/index.js:117:32)npm noticenpm notice New minor version of npm available! 10.2.3 -> 10.3.0npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.3.0>
this is my pkg json
{ "name": "gqlmesh", "version": "1.0.0", "main": "index.js", "author": "Fredo", "license": "MIT", "scripts": { "start": "mesh dev", "build": "echo \"noop\";" }, "dependencies": { "@graphql-mesh/cli": "^0.88.4", "@graphql-mesh/openapi": "^0.97.3", "@graphql-mesh/plugin-newrelic": "^0.96.2", "@graphql-mesh/runtime": "^0.97.3", "@graphql-mesh/transform-filter-schema": "^0.96.2", "@graphql-mesh/transform-rename": "^0.96.0", "graphql": "^16.8.1", "@envelop/core": "^5.0.0", "@envelop/newrelic": "^7.0.0", "@graphql-mesh/string-interpolation": "^0.5.3", "tslib": "^2.6.1" } }
Also my Dockerfile
`
Build Stage
FROM amazonaws.com/fr-gqlgateway:bullseye AS BUILD_IMAGE
WORKDIR /app
Copy package.json and yarn.lock
COPY package.json ./
Install dependencies
RUN npm install
Copy the rest of your app's source code
COPY . .
Production Stage
FROM amazonaws.com/fr-gqlgateway:bullseye AS PRODUCTION_STAGE
WORKDIR /app
Copy the node_modules and the rest of the app from the build stage
COPY --from=BUILD_IMAGE /app .
ENV NODE_ENV=production
ENV NEW_RELIC_LICENSE_KEY=key
ENV NEW_RELIC_APP_NAME=gqlgateway
ENV NEW_RELIC_FEATURE_FLAG_UNDICI_INSTRUMENTATION=true
ENV NEW_RELIC_FEATURE_FLAG_UNDICI_ASYNC_TRACKING=true
ENV NEW_RELIC_FEATURE_FLAG_NEW_PROMISE_TRACKING=true
EXPOSE 4000
Start the application using the start script from package.json
CMD ["npm", "start"]
`
mesh config
`
sources:
handler:
openapi:
source: http://localhost:5000/swagger/v1/swagger.json
ignoreErrorResponses: true
logger:
level: info
pretty: true
`
Beta Was this translation helpful? Give feedback.
All reactions