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
Copy file name to clipboardExpand all lines: README.md
+91-3Lines changed: 91 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -302,7 +302,7 @@ The possible values for the annotation can be
302
302
* `"my-other-namespace/my-instrumentation"` - name and namespace of `Instrumentation` CR instance in another namespace.
303
303
* `"false"` - do not inject
304
304
305
-
#### Multi-container pods
305
+
#### Multi-container pods with single instrumentation
306
306
307
307
If nothing else is specified, instrumentation is performed on the first container available in the pod spec.
308
308
In some cases (for example in the case of the injection of an Istio sidecar) it becomes necessary to specify on which container(s) this injection must be performed.
@@ -342,6 +342,90 @@ In the above case, `myapp` and `myapp2` containers will be instrumented, `myapp3
342
342
343
343
> 🚨 **NOTE**: Go auto-instrumentation **does not** support multicontainer pods. When injecting Go auto-instrumentation the first pod should be the only pod you want instrumented.
344
344
345
+
#### Multi-container pods with multiple instrumentations
346
+
347
+
Works only when `operator.autoinstrumentation.multi-instrumentation` feature is `enabled`.
348
+
349
+
Annotations defining which language instrumentation will be injected are required. When feature is enabled, specific for Instrumentation language containers annotations are used:
If language instrumentation specific container names are not specified, instrumentation is performed on the first container available in the pod spec (only if single instrumentation injection is configured).
387
+
388
+
In some cases containers in the pod are using different technologies. It becomes necessary to specify language instrumentation for container(s) on which this injection must be performed.
389
+
390
+
For this, we will use language instrumentation specific container names annotation for which we will indicate one or more container names (`.spec.containers.name`) on which the injection must be made:
In the above case, `myapp` and `myapp2` containers will be instrumented using Java and `myapp3` using Python instrumentation.
422
+
423
+
**NOTE**: Go auto-instrumentation **does not** support multicontainer pods. When injecting Go auto-instrumentation the first container should be the only you want to instrument.
424
+
425
+
**NOTE**: This type of instrumentation **does not** allow to instrument a container with multiple language instrumentations.
426
+
427
+
**NOTE**: `instrumentation.opentelemetry.io/container-names` annotation is not used for this feature.
428
+
345
429
#### Use customized or vendor instrumentation
346
430
347
431
By default, the operator uses upstream auto-instrumentation libraries. Custom auto-instrumentation can be configured by
The operator allows specifying, via the feature gates, which languages the Instrumentation resource may instrument.
404
488
These feature gates must be passed to the operator via the `--feature-gates` flag.
405
489
The flag allows for a comma-delimited list of feature gate identifiers.
406
-
Prefix a gate with '-' to disable support for the corresponding language.
407
-
Prefixing a gate with '+' or no prefix will enable support for the corresponding language.
490
+
Prefix a gate with '-' to disable support for the corresponding language or multi instrumentation feature.
491
+
Prefixing a gate with '+' or no prefix will enable support for the corresponding language or multi instrumentation feature.
408
492
If a language is enabled by default its gate only needs to be supplied when disabling the gate.
409
493
410
494
| Language | Gate | Default Value |
@@ -418,6 +502,10 @@ If a language is enabled by default its gate only needs to be supplied when disa
418
502
419
503
Language not specified in the table are always supported and cannot be disabled.
420
504
505
+
OpenTelemetry Operator allows to instrument multiple containers using multiple language specific instrumentations.
506
+
These feature can be enabled using `operator.autoinstrumentation.multi-instrumentation` flag. By default flag is `disabled`.
507
+
For more information about multi-instrumentation feature capabilities please see [Multi-container pods with multiple instrumentations](#Multi-container-pods-with-multiple-instrumentations).
508
+
421
509
### Target Allocator
422
510
423
511
The OpenTelemetry Operator comes with an optional component, the [Target Allocator](/cmd/otel-allocator/README.md) (TA). When creating an OpenTelemetryCollector Custom Resource (CR) and setting the TA as enabled, the Operator will create a new deployment and service to serve specific `http_sd_config` directives for each Collector pod as part of that CR. It will also change the Prometheus receiver configuration in the CR, so that it uses the [http_sd_config](https://prometheus.io/docs/prometheus/latest/http_sd/) from the TA. The following example shows how to get started with the Target Allocator:
// Supported .NET runtime identifiers (https://learn.microsoft.com/en-us/dotnet/core/rid-catalog), can be set by instrumentation.opentelemetry.io/inject-dotnet.
@@ -108,28 +111,28 @@ func injectDotNetSDK(dotNetSpec v1alpha1.DotNet, pod corev1.Pod, index int) (cor
0 commit comments