diff --git a/README.md b/README.md index 66b71ed837..27850c6e3d 100644 --- a/README.md +++ b/README.md @@ -156,8 +156,11 @@ EOF ### OpenTelemetry auto-instrumentation injection -The operator can inject and configure OpenTelemetry auto-instrumentation libraries. At this moment, the operator can inject only OpenTelemetry [Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). +The operator can inject and configure OpenTelemetry auto-instrumentation libraries. +#### Java + +The operator can inject OpenTelemetry [Java auto-instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). The injection of the Java agent can be enabled by adding an annotation to the namespace, so that all pods within that namespace will get the instrumentation, or by adding the annotation to individual PodSpec objects, available as part of Deployment, Statefulset, and other resources. ```bash @@ -193,6 +196,42 @@ EOF The above CR can be queried by `kubectl get otelinst`. +#### NodeJS + +The operator can inject OpenTelemetry [NodeJS auto-instrumentation](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/metapackages/auto-instrumentations-node). +The injection of the NodeJS instrumentation can be enabled by adding an annotation to the namespace, so that all pods within that namespace will get the instrumentation, or by adding the annotation to individual PodSpec objects, available as part of Deployment, Statefulset, and other resources. + +```bash +instrumentation.opentelemetry.io/inject-nodejs: "true" +``` + +The value can be +* `"false"` - do not inject +* `"true"` - inject and `Instrumentation` resource from the namespace. +* `"nodejs-instrumentation"` - name of `Instrumentation` CR instance. + +In addition to the annotation, the following `CR` has to be created. The `Instrumentation` resource provides configuration for OpenTelemetry SDK and auto-instrumentation. + +```yaml +kubectl apply -f - <