Improve observability (#834)
* API generation * Added correlation id support * Updated docs * Updated test * Updated code generation * API generation * Updated code generation * Added support for client name and custom context object * Updated docs * Updated test * Fix docs * Updated docs * Added id support also for sniffing * Updated test * Update docs/observability.asciidoc Co-Authored-By: delvedor <delvedor@users.noreply.github.com> * Update docs/observability.asciidoc Co-Authored-By: delvedor <delvedor@users.noreply.github.com> * Apply suggestions * Update docs/configuration.asciidoc Co-Authored-By: delvedor <delvedor@users.noreply.github.com> * Update docs/configuration.asciidoc Co-Authored-By: delvedor <delvedor@users.noreply.github.com> * Update docs/observability.asciidoc Co-Authored-By: delvedor <delvedor@users.noreply.github.com> * Update docs/observability.asciidoc Co-Authored-By: delvedor <delvedor@users.noreply.github.com> * Update docs/observability.asciidoc Co-Authored-By: delvedor <delvedor@users.noreply.github.com> * Apply suggestions * Updated README.md * Fixed test * Addressed suggestions
This commit is contained in:
committed by
GitHub
parent
1261e60d41
commit
269c0fc96a
14
lib/ConnectionPool.d.ts
vendored
14
lib/ConnectionPool.d.ts
vendored
@ -36,10 +36,20 @@ export interface getConnectionOptions {
|
||||
selector?: nodeSelectorFn;
|
||||
}
|
||||
|
||||
export interface resurrectOptions {
|
||||
now?: number;
|
||||
requestId: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface ResurrectEvent {
|
||||
strategy: string;
|
||||
isAlive: boolean;
|
||||
connection: Connection;
|
||||
name: string;
|
||||
request: {
|
||||
id: any;
|
||||
};
|
||||
}
|
||||
|
||||
export default class ConnectionPool {
|
||||
@ -79,10 +89,10 @@ export default class ConnectionPool {
|
||||
* If enabled, tries to resurrect a connection with the given
|
||||
* resurrect strategy ('ping', 'optimistic', 'none').
|
||||
*
|
||||
* @param {number} epoch
|
||||
* @param {object} { now, requestId, name }
|
||||
* @param {function} callback (isAlive, connection)
|
||||
*/
|
||||
resurrect(now?: number, callback?: (isAlive: boolean | null, connection: Connection | null) => void): void;
|
||||
resurrect(opts: resurrectOptions, callback?: (isAlive: boolean | null, connection: Connection | null) => void): void;
|
||||
/**
|
||||
* Returns an alive connection if present,
|
||||
* otherwise returns null.
|
||||
|
||||
Reference in New Issue
Block a user