Remove @google-cloud/debug-agent from metrics (#14974)

GitOrigin-RevId: 80510ef28a14eaa2f4488844cb79a649009a03d9
This commit is contained in:
Alf Eaton 2023-10-02 11:27:31 +01:00 committed by Copybot
parent 9098d6fba7
commit e226dc1442
4 changed files with 27 additions and 1581 deletions

View file

@ -25,7 +25,6 @@ The metrics module can be configured through the following environment variables
- `DEBUG_METRICS` - enables display of debugging messages to the console.
- `ENABLE_TRACE_AGENT` - enables @google-cloud/trace-agent on Google Cloud
- `ENABLE_DEBUG_AGENT` - enables @google-cloud/debug-agent on Google Cloud
- `ENABLE_PROFILE_AGENT` - enables @google-cloud/profiler on Google Cloud
- `METRICS_COMPRESSION_LEVEL` - sets the [compression level](https://www.npmjs.com/package/compression#level) for `/metrics`
- `STACKDRIVER_LOGGING` - toggles the request logging format

View file

@ -51,19 +51,6 @@ function initialize(appName, opts = {}) {
traceAgent.start(traceOpts)
}
console.log(`ENABLE_DEBUG_AGENT set to ${process.env.ENABLE_DEBUG_AGENT}`)
if (process.env.ENABLE_DEBUG_AGENT === 'true') {
console.log('starting google debug agent')
const debugAgent = require('@google-cloud/debug-agent')
debugAgent.start({
allowExpressions: true,
serviceContext: {
service: appName,
version: process.env.BUILD_VERSION,
},
})
}
console.log(`ENABLE_PROFILE_AGENT set to ${process.env.ENABLE_PROFILE_AGENT}`)
if (process.env.ENABLE_PROFILE_AGENT === 'true') {
console.log('starting google profile agent')

View file

@ -7,7 +7,6 @@
"url": "https://github.com/overleaf/metrics-module.git"
},
"dependencies": {
"@google-cloud/debug-agent": "^8.0.0",
"@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0",
"@google-cloud/profiler": "^6.0.0",
"@google-cloud/trace-agent": "^7.1.2",

1593
package-lock.json generated

File diff suppressed because it is too large Load diff