feat: Add option databaseOptions.clientMetadata to send custom metadata to database server for logging and debugging (#10017)

This commit is contained in:
Copilot
2026-01-24 22:44:38 +01:00
committed by GitHub
parent ba3e7602e6
commit 756c204220
9 changed files with 111 additions and 2 deletions

View File

@@ -755,6 +755,15 @@ export interface DatabaseOptions {
allowPublicExplain: ?boolean;
/* An array of MongoDB client event configurations to enable logging of specific events. */
logClientEvents: ?(LogClientEvent[]);
/* 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. */
clientMetadata: ?DatabaseOptionsClientMetadata;
}
export interface DatabaseOptionsClientMetadata {
/* The name to identify your application in database logs (e.g., 'MyApp'). */
name: string;
/* The version of your application (e.g., '1.0.0'). */
version: string;
}
export interface AuthAdapter {