Skip to content

Commit

Permalink
Improve observability (#834)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
delvedor committed May 3, 2019
1 parent 7d810f8 commit 14fc908
Show file tree
Hide file tree
Showing 279 changed files with 2,314 additions and 142 deletions.
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -119,6 +119,10 @@ The client is designed to be easily configured as you see fit for your needs, fo
nodeFilter: nodeFilterFn;
// custom selection strategy, defaults `round-robin`
nodeSelector: nodeSelectorFn | string;
// function to generate the request id for every request
generateRequestId: generateRequestIdFn;
// name to identify the client instance in the events
name: string;
}
```

Expand All @@ -143,7 +147,9 @@ The supported *request specific options* are:
asStream: boolean, // default `false`
compression: string, // default `false`
headers: object, // default `null`
querystring: object // default `null`
querystring: object // default `null`,
context: object // default `null`,
id: any // default incr. integer
}
```

Expand Down
2 changes: 2 additions & 0 deletions api/api/bulk.js
Expand Up @@ -138,6 +138,8 @@ function buildBulk (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.aliases.js
Expand Up @@ -120,6 +120,8 @@ function buildCatAliases (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.allocation.js
Expand Up @@ -122,6 +122,8 @@ function buildCatAllocation (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.count.js
Expand Up @@ -120,6 +120,8 @@ function buildCatCount (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.fielddata.js
Expand Up @@ -124,6 +124,8 @@ function buildCatFielddata (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.health.js
Expand Up @@ -117,6 +117,8 @@ function buildCatHealth (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.help.js
Expand Up @@ -104,6 +104,8 @@ function buildCatHelp (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.indices.js
Expand Up @@ -126,6 +126,8 @@ function buildCatIndices (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.master.js
Expand Up @@ -115,6 +115,8 @@ function buildCatMaster (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.nodeattrs.js
Expand Up @@ -115,6 +115,8 @@ function buildCatNodeattrs (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.nodes.js
Expand Up @@ -118,6 +118,8 @@ function buildCatNodes (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.pending_tasks.js
Expand Up @@ -115,6 +115,8 @@ function buildCatPendingTasks (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.plugins.js
Expand Up @@ -115,6 +115,8 @@ function buildCatPlugins (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.recovery.js
Expand Up @@ -120,6 +120,8 @@ function buildCatRecovery (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.repositories.js
Expand Up @@ -115,6 +115,8 @@ function buildCatRepositories (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.segments.js
Expand Up @@ -117,6 +117,8 @@ function buildCatSegments (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.shards.js
Expand Up @@ -122,6 +122,8 @@ function buildCatShards (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.snapshots.js
Expand Up @@ -121,6 +121,8 @@ function buildCatSnapshots (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.tasks.js
Expand Up @@ -120,6 +120,8 @@ function buildCatTasks (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.templates.js
Expand Up @@ -120,6 +120,8 @@ function buildCatTemplates (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cat.thread_pool.js
Expand Up @@ -122,6 +122,8 @@ function buildCatThreadPool (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.delete_auto_follow_pattern.js
Expand Up @@ -96,6 +96,8 @@ function buildCcrDeleteAutoFollowPattern (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.follow.js
Expand Up @@ -102,6 +102,8 @@ function buildCcrFollow (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.follow_info.js
Expand Up @@ -90,6 +90,8 @@ function buildCcrFollowInfo (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.follow_stats.js
Expand Up @@ -90,6 +90,8 @@ function buildCcrFollowStats (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.forget_follower.js
Expand Up @@ -101,6 +101,8 @@ function buildCcrForgetFollower (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.get_auto_follow_pattern.js
Expand Up @@ -94,6 +94,8 @@ function buildCcrGetAutoFollowPattern (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.pause_follow.js
Expand Up @@ -96,6 +96,8 @@ function buildCcrPauseFollow (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.put_auto_follow_pattern.js
Expand Up @@ -101,6 +101,8 @@ function buildCcrPutAutoFollowPattern (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.resume_follow.js
Expand Up @@ -97,6 +97,8 @@ function buildCcrResumeFollow (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.stats.js
Expand Up @@ -89,6 +89,8 @@ function buildCcrStats (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/ccr.unfollow.js
Expand Up @@ -96,6 +96,8 @@ function buildCcrUnfollow (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/clear_scroll.js
Expand Up @@ -100,6 +100,8 @@ function buildClearScroll (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.allocation_explain.js
Expand Up @@ -101,6 +101,8 @@ function buildClusterAllocationExplain (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.get_settings.js
Expand Up @@ -111,6 +111,8 @@ function buildClusterGetSettings (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.health.js
Expand Up @@ -132,6 +132,8 @@ function buildClusterHealth (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.pending_tasks.js
Expand Up @@ -105,6 +105,8 @@ function buildClusterPendingTasks (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.put_settings.js
Expand Up @@ -109,6 +109,8 @@ function buildClusterPutSettings (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.remote_info.js
Expand Up @@ -100,6 +100,8 @@ function buildClusterRemoteInfo (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.reroute.js
Expand Up @@ -110,6 +110,8 @@ function buildClusterReroute (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.state.js
Expand Up @@ -137,6 +137,8 @@ function buildClusterState (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down
2 changes: 2 additions & 0 deletions api/api/cluster.stats.js
Expand Up @@ -110,6 +110,8 @@ function buildClusterStats (opts) {
headers: options.headers || null,
querystring: options.querystring || null,
compression: options.compression || false,
id: options.id || null,
context: options.context || null,
warnings
}

Expand Down

0 comments on commit 14fc908

Please sign in to comment.