@graphql-mesh/plugin-newrelic 0.3.18 → 0.3.19-alpha-20230321145025-cc027190e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.js CHANGED
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const newrelic_1 = require("@envelop/newrelic");
5
- const string_interpolation_1 = require("@graphql-mesh/string-interpolation");
6
- const cross_helpers_1 = require("@graphql-mesh/cross-helpers");
7
- const http_external_js_1 = tslib_1.__importDefault(require("newrelic/lib/metrics/recorders/http_external.js"));
4
+ const newrelic_1 = tslib_1.__importDefault(require("newrelic"));
8
5
  const names_js_1 = tslib_1.__importDefault(require("newrelic/lib/metrics/names.js"));
6
+ const http_external_js_1 = tslib_1.__importDefault(require("newrelic/lib/metrics/recorders/http_external.js"));
9
7
  const cat_js_1 = tslib_1.__importDefault(require("newrelic/lib/util/cat.js"));
8
+ const newrelic_2 = require("@envelop/newrelic");
9
+ const cross_helpers_1 = require("@graphql-mesh/cross-helpers");
10
+ const string_interpolation_1 = require("@graphql-mesh/string-interpolation");
10
11
  const utils_1 = require("@graphql-mesh/utils");
11
- const newrelic_2 = tslib_1.__importDefault(require("newrelic"));
12
12
  const EnvelopAttributeName = 'Envelop_NewRelic_Plugin';
13
13
  function useMeshNewrelic(options) {
14
- const instrumentationApi = newrelic_2.default === null || newrelic_2.default === void 0 ? void 0 : newrelic_2.default.shim;
14
+ const instrumentationApi = newrelic_1.default === null || newrelic_1.default === void 0 ? void 0 : newrelic_1.default.shim;
15
15
  if (!(instrumentationApi === null || instrumentationApi === void 0 ? void 0 : instrumentationApi.agent)) {
16
16
  options.logger.debug('Agent unavailable. Please check your New Relic Agent configuration and ensure New Relic is enabled.');
17
17
  return {};
@@ -23,7 +23,7 @@ function useMeshNewrelic(options) {
23
23
  const segmentByRequestContext = new WeakMap();
24
24
  return {
25
25
  onPluginInit({ addPlugin }) {
26
- addPlugin((0, newrelic_1.useNewRelic)({
26
+ addPlugin((0, newrelic_2.useNewRelic)({
27
27
  ...options,
28
28
  extractOperationName: options.extractOperationName
29
29
  ? context => string_interpolation_1.stringInterpolator.parse(options.extractOperationName, {
package/esm/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { useNewRelic } from '@envelop/newrelic';
2
- import { stringInterpolator } from '@graphql-mesh/string-interpolation';
3
- import { process } from '@graphql-mesh/cross-helpers';
4
- import recordExternal from 'newrelic/lib/metrics/recorders/http_external.js';
1
+ import newRelic from 'newrelic';
5
2
  import NAMES from 'newrelic/lib/metrics/names.js';
3
+ import recordExternal from 'newrelic/lib/metrics/recorders/http_external.js';
6
4
  import cat from 'newrelic/lib/util/cat.js';
5
+ import { useNewRelic } from '@envelop/newrelic';
6
+ import { process } from '@graphql-mesh/cross-helpers';
7
+ import { stringInterpolator } from '@graphql-mesh/string-interpolation';
7
8
  import { getHeadersObj } from '@graphql-mesh/utils';
8
- import newRelic from 'newrelic';
9
9
  const EnvelopAttributeName = 'Envelop_NewRelic_Plugin';
10
10
  export default function useMeshNewrelic(options) {
11
11
  const instrumentationApi = newRelic === null || newRelic === void 0 ? void 0 : newRelic.shim;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-mesh/plugin-newrelic",
3
- "version": "0.3.18",
3
+ "version": "0.3.19-alpha-20230321145025-cc027190e",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "*",
@@ -11,8 +11,8 @@
11
11
  "@envelop/newrelic": "5.0.6",
12
12
  "@graphql-mesh/cross-helpers": "0.3.3",
13
13
  "@graphql-mesh/string-interpolation": "0.4.2",
14
- "@graphql-mesh/types": "0.91.9",
15
- "@graphql-mesh/utils": "0.43.17",
14
+ "@graphql-mesh/types": "0.91.10-alpha-20230321145025-cc027190e",
15
+ "@graphql-mesh/utils": "0.43.18-alpha-20230321145025-cc027190e",
16
16
  "tslib": "^2.4.0"
17
17
  },
18
18
  "repository": {