feat: Add option databaseOptions.clientMetadata to send custom metadata to database server for logging and debugging (#10017)
This commit is contained in:
@@ -1179,6 +1179,13 @@ module.exports.DatabaseOptions = {
|
||||
'The MongoDB driver option to specify the amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the autoSelectFamily option. If set to a positive integer less than 10, the value 10 is used instead.',
|
||||
action: parsers.numberParser('autoSelectFamilyAttemptTimeout'),
|
||||
},
|
||||
clientMetadata: {
|
||||
env: 'PARSE_SERVER_DATABASE_CLIENT_METADATA',
|
||||
help:
|
||||
"Custom metadata to append to database client connections for identifying Parse Server instances in database logs. If set, this metadata will be visible in database logs during connection handshakes. This can help with debugging and monitoring in deployments with multiple database clients. Set `name` to identify your application (e.g., 'MyApp') and `version` to your application's version. Leave undefined (default) to disable this feature and avoid the additional data transfer overhead.",
|
||||
action: parsers.objectParser,
|
||||
type: 'DatabaseOptionsClientMetadata',
|
||||
},
|
||||
compressors: {
|
||||
env: 'PARSE_SERVER_DATABASE_COMPRESSORS',
|
||||
help:
|
||||
@@ -1461,6 +1468,18 @@ module.exports.DatabaseOptions = {
|
||||
action: parsers.numberParser('zlibCompressionLevel'),
|
||||
},
|
||||
};
|
||||
module.exports.DatabaseOptionsClientMetadata = {
|
||||
name: {
|
||||
env: 'PARSE_SERVER_DATABASE_CLIENT_METADATA_NAME',
|
||||
help: "The name to identify your application in database logs (e.g., 'MyApp').",
|
||||
required: true,
|
||||
},
|
||||
version: {
|
||||
env: 'PARSE_SERVER_DATABASE_CLIENT_METADATA_VERSION',
|
||||
help: "The version of your application (e.g., '1.0.0').",
|
||||
required: true,
|
||||
},
|
||||
};
|
||||
module.exports.AuthAdapter = {
|
||||
enabled: {
|
||||
help: 'Is `true` if the auth adapter is enabled, `false` otherwise.',
|
||||
|
||||
Reference in New Issue
Block a user