Skip to content

Commit ed9db61

Browse files
committed
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
1 parent c47725d commit ed9db61

File tree

279 files changed

+18696
-142
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

279 files changed

+18696
-142
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ The client is designed to be easily configured as you see fit for your needs, fo
119119
nodeFilter: nodeFilterFn;
120120
// custom selection strategy, defaults `round-robin`
121121
nodeSelector: nodeSelectorFn | string;
122+
// function to generate the request id for every request
123+
generateRequestId: generateRequestIdFn;
124+
// name to identify the client instance in the events
125+
name: string;
122126
}
123127
```
124128

@@ -143,7 +147,9 @@ The supported *request specific options* are:
143147
asStream: boolean, // default `false`
144148
compression: string, // default `false`
145149
headers: object, // default `null`
146-
querystring: object // default `null`
150+
querystring: object // default `null`,
151+
context: object // default `null`,
152+
id: any // default incr. integer
147153
}
148154
```
149155

api/api/bulk.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ function buildBulk (opts) {
138138
headers: options.headers || null,
139139
querystring: options.querystring || null,
140140
compression: options.compression || false,
141+
id: options.id || null,
142+
context: options.context || null,
141143
warnings
142144
}
143145

api/api/cat.aliases.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ function buildCatAliases (opts) {
120120
headers: options.headers || null,
121121
querystring: options.querystring || null,
122122
compression: options.compression || false,
123+
id: options.id || null,
124+
context: options.context || null,
123125
warnings
124126
}
125127

api/api/cat.allocation.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ function buildCatAllocation (opts) {
122122
headers: options.headers || null,
123123
querystring: options.querystring || null,
124124
compression: options.compression || false,
125+
id: options.id || null,
126+
context: options.context || null,
125127
warnings
126128
}
127129

api/api/cat.count.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ function buildCatCount (opts) {
120120
headers: options.headers || null,
121121
querystring: options.querystring || null,
122122
compression: options.compression || false,
123+
id: options.id || null,
124+
context: options.context || null,
123125
warnings
124126
}
125127

api/api/cat.fielddata.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ function buildCatFielddata (opts) {
124124
headers: options.headers || null,
125125
querystring: options.querystring || null,
126126
compression: options.compression || false,
127+
id: options.id || null,
128+
context: options.context || null,
127129
warnings
128130
}
129131

api/api/cat.health.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ function buildCatHealth (opts) {
117117
headers: options.headers || null,
118118
querystring: options.querystring || null,
119119
compression: options.compression || false,
120+
id: options.id || null,
121+
context: options.context || null,
120122
warnings
121123
}
122124

api/api/cat.help.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ function buildCatHelp (opts) {
104104
headers: options.headers || null,
105105
querystring: options.querystring || null,
106106
compression: options.compression || false,
107+
id: options.id || null,
108+
context: options.context || null,
107109
warnings
108110
}
109111

api/api/cat.indices.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ function buildCatIndices (opts) {
126126
headers: options.headers || null,
127127
querystring: options.querystring || null,
128128
compression: options.compression || false,
129+
id: options.id || null,
130+
context: options.context || null,
129131
warnings
130132
}
131133

api/api/cat.master.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ function buildCatMaster (opts) {
115115
headers: options.headers || null,
116116
querystring: options.querystring || null,
117117
compression: options.compression || false,
118+
id: options.id || null,
119+
context: options.context || null,
118120
warnings
119121
}
120122

0 commit comments

Comments
 (0)