我正在尝试测量我在 New Relic 上部署的 NextJS 应用程序的性能。但 New Relic 无法使用我部署的 NextJS 应用程序中的信息,该应用程序已部署在 Firebase 托管上。它在应用程序在本地运行时消耗信息,但在部署时不消耗信息。请问有人可以帮忙吗?
"use strict";
/**
* New Relic agent configuration.
*
* See lib/config/default.js in the agent distribution for a more complete
* description of configuration variables and their potential values.
*/
const isProd = process.env.NODE_ENV === "production";
exports.config = {
/**
* Array of application names.
*/
app_name: [isProd? "prod_app_name" : "local_app_name"],
/**
* Your New Relic license key.
*/
license_key: isProd ? "prod_license_key" : "local_license_key",
/**
* This setting controls distributed tracing.
* Distributed tracing lets you see the path that a request takes through your
* distributed system. Enabling distributed tracing changes the behavior of some
* New Relic features, so carefully consult the transition guide before you enable
* this feature: https://docs.newrelic.com/docs/transition-guide-distributed-tracing
* Default is true.
*/
distributed_tracing: {
/**
* Enables/disables distributed tracing.
*
* @env NEW_RELIC_DISTRIBUTED_TRACING_ENABLED
*/
enabled: true,
},
logging: {
/**
* Level at which to log. 'trace' is most useful to New Relic when diagnosing
* issues with the agent, 'info' and higher will impose the least overhead on
* production applications.
*/
level: "info",
},
application_logging: {
forwarding: {
enabled: true,
},
},
/**
* When true, all request headers except for those listed in attributes.exclude
* will be captured for all traces, unless otherwise specified in a destination's
* attributes include/exclude lists.
*/
allow_all_headers: true,
attributes: {
/**
* Prefix of attributes to exclude from all destinations. Allows * as wildcard
* at end.
*
* NOTE: If excluding headers, they must be in camelCase form to be filtered.
*
* @env NEW_RELIC_ATTRIBUTES_EXCLUDE
*/
exclude: [
"request.headers.cookie",
"request.headers.authorization",
"request.headers.proxyAuthorization",
"request.headers.setCookie*",
"request.headers.x*",
"response.headers.cookie",
"response.headers.authorization",
"response.headers.proxyAuthorization",
"response.headers.setCookie*",
"response.headers.x*",
],
},
};
以上是我的 newrelic.js 代码。
我非常确定 New Relic 不支持 Firebase,这就是它无法运行的原因。
您是否考虑过使用其他托管程序,例如 Microsoft Azure 或 Heroku?