You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 31, 2024. It is now read-only.
|`suppressInternalInstrumentation`|`boolean`| Elasticsearch operation use http/https under the hood. Setting this to true will hide the underlying request spans (if instrumented). |
37
-
|`responseHook`|`ElasticsearchResponseCustomAttributesFunction`|Hook called before response is returned, which allows to add custom attributes to span.|
38
-
| `dbStatementSerializer` | `DbStatementSerializer`| Elasticsearch instrumentation will serialize `db.statement` using the specified function.
39
-
|`moduleVersionAttributeName`|`string`| If passed, a span attribute will be added to all spans with key of the provided `moduleVersionAttributeName` and value of the patched module version |
42
+
| Options | Type | Default | Description |
43
+
| --- | --- | ---|--- |
44
+
|`suppressInternalInstrumentation`|`boolean`|`false`|Elasticsearch operation use http/https under the hood. Setting this to true will hide the underlying request spans (if instrumented). |
45
+
|`responseHook`|`ResponseHook` (function) |`undefined`|Hook called before response is returned, which allows to add custom attributes to span.<br>Function receive params: `span`<br>`result` (object)|
46
+
| `dbStatementSerializer` | `DbStatementSerializer`(function) | `JSON.stringify({params, options})` | Elasticsearch instrumentation will serialize `db.statement` using this function response.<br>Function receive params: `operation` (string)<br>`params` (object)<br>`options` (object)<br>Function response must be a `string`
47
+
|`moduleVersionAttributeName`|`string`|`undefined`|If passed, a span attribute will be added to all spans with key of the provided `moduleVersionAttributeName` and value of the `@elastic/elasticsearch` version |
40
48
41
49
Please make sure `dbStatementSerializer` is error proof, as errors are not handled while executing this function.
42
50
51
+
### `db.operation` attribute
52
+
`db.operation` contain the API function called.
53
+
For the full list see [API reference](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html).
54
+
55
+
Few examples:
56
+
*`client.bulk`
57
+
*`client.search`
58
+
*`client.index`
59
+
*`cat.shards`
60
+
*`cluster.health`
61
+
43
62
---
44
63
45
64
This extension (and many others) was developed by [Aspecto](https://www.aspecto.io/) with ❤️
0 commit comments