Skip to content

Commit

Permalink
test: add a test for native @elastic/elasticsearch instrumentation (#264
Browse files Browse the repository at this point in the history
)
  • Loading branch information
trentm authored Jan 27, 2025
1 parent 0062eab commit d81e59c
Show file tree
Hide file tree
Showing 10 changed files with 778 additions and 8 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/test-edot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ jobs:
runs-on: ubuntu-24.04

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.17.1
env:
ES_JAVA_OPTS: '-Xms512m -Xmx512m'
network.host: '_site_'
transport.host: '127.0.0.1'
http.host: '0.0.0.0'
xpack.security.enabled: 'false'
ports:
- 9200:9200

redis:
image: redis:7
ports:
Expand Down Expand Up @@ -83,7 +94,7 @@ jobs:
MSSQL_SA_PASSWORD: 'Very(!)Secure'
ports:
- "1433:1433"

cassandra:
image: cassandra:3
env:
Expand Down
1 change: 1 addition & 0 deletions packages/opentelemetry-node/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
of instrumentations. See <https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-mysql2#readme>
- feat: Add `@opentelemetry/instrumentation-cassandra-driver` to the default set
of instrumentations. See <https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/plugins/node/opentelemetry-instrumentation-cassandra#readme>
- test: Test that the native instrumentation in `@elastic/[email protected]` and later works.


## v0.6.0
Expand Down
13 changes: 13 additions & 0 deletions packages/opentelemetry-node/docs/supported-technologies.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ requires:
| `@opentelemetry/instrumentation-undici` | `undici` version range `>=5.12.0` | [README](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-undici#readme) |
| `@opentelemetry/instrumentation-winston` | `winston` version range `>1 <4` | [README](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-winston#readme) |

## Native Instrumentations

"Native" instrumentation refers to OpenTelemetry instrumentation that is built into a library. When a library includes native OTel instrumentation, it will provide telemetry data to providers registered by a running OTel SDK. Native instrumentions of note are listed in the table below. To benefit from these instrumentations you only need to (a) use the library and (b) start the EDOT Node.js SDK:

```bash
node --import @elastic/opentelemetry-node my-app.js
```

| Packages instrumented | Reference |
|---|---|
| `@elastic/elasticsearch` version range `>=8.15.0` | [Elasticsearch JavaScript Client docs](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html) |


## ECMAScript Modules (ESM)

This Distro includes **limited and experimental** support for instrumenting [ECMAScript module imports](https://nodejs.org/api/esm.html#modules-ecmascript-modules), i.e. modules that are loaded via `import ...` statements and `import('...')` (dynamic import).
Expand Down
Loading

0 comments on commit d81e59c

Please sign in to comment.