Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update operator integration statuses and cli arg options #1251

Closed
wants to merge 13 commits into from
Closed
12 changes: 12 additions & 0 deletions .chloggen/add-operator-cli-args.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
component: operator
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Refactored operator to use cli args instead of feature gates to control instrumentation availability
dmitryax marked this conversation as resolved.
Show resolved Hide resolved
# One or more tracking issues related to the change
issues: [1251]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: If you're utilizing operator feature gates or auto-instrumentation for apache-httpd, go, nginx, or python, please see [upgrade guidelines](https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UPGRADING.md#01000-01001)
13 changes: 13 additions & 0 deletions .chloggen/operator-update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other)
component: operator
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Bump operator app to v0.99.0 while keeping operator chart at v0.49.1 due to values.schema.json validation blocker
# One or more tracking issues related to the change
issues: [1251]
# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
Holding off on updating the operator chart until changes are adopted for [1065](https://github.com/open-telemetry/opentelemetry-helm-charts/pull/1065)
10 changes: 6 additions & 4 deletions .github/workflows/update_chart_dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ jobs:
component: 'operator'
yaml_file_path: 'helm-charts/splunk-otel-collector/Chart.yaml'
dependency_name: 'cert-manager'
- name: 'operator'
component: 'operator'
yaml_file_path: 'helm-charts/splunk-otel-collector/Chart.yaml'
dependency_name: 'opentelemetry-operator'
# TODO: Add this back once this chart has been updated to adhere to
# the operator chart schema validation rules. See: https://github.com/open-telemetry/opentelemetry-helm-charts/pull/1065
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What extra properties do we supply?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The upstream operator chart doesn't have a field to enable adding default instrumentation anymore since open-telemetry/opentelemetry-helm-charts#1065 was added. This affected us and other companies.

Copy link
Contributor

@dmitryax dmitryax May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't have a field to enable adding default instrumentation

Which field in instrumentation.*?

Copy link
Contributor

@dmitryax dmitryax May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should've not used a section that is supposed to be passed to the sub-chart for our own purposes. Now we should either:

  1. move instrumentation out from operator breaking users relying on this option
  2. or change the operator alias breaking user passing stuff to the operator.

The second option seems preferable to me. Similar to what you do, but instead of removing subchart, remove the alias

Copy link
Contributor

@dmitryax dmitryax May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. But this is still wrong. open-telemetry/opentelemetry-helm-charts#1065 should not be reverted. There is nothing wrong with that PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to explain why it's wrong: Imagine the sub-chart adds support of the instrumentation section with conflicting behavior.

Copy link
Contributor

@dmitryax dmitryax May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think we should move instrumentation out of operator and keep the alias. Otherwise we break operator.enabled and operator.admissionWebhooks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Yeah option 1 is starting to sound good to me. Going to think on it a little more. I wanted to handle updating our instrumentation helm values as part of a separate ticket.
  • I should also mention the related blocker for this PR. The operator replaced several instrumentation feature gates with command-line arguments incrementally from version 0.95.0 (used before this PR) to version 0.99.0 (used after this PR). This is why I want to upgrade to operator v0.99.0 in this PR. Otherwise, our documentation would have to include feature gates and CLI arguments at the same time which is more confusing.

Copy link
Contributor Author

@jvoravong jvoravong May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ticket is blocked until we complete the following in a separate PR.

  • Complete option 1, move operator.instrumentation out of the operator sub-chart values.
  • Upgrade the operator sub-chart to the latest version
  • This will include moving some code from this PR to the separate PR.

# - name: 'operator'
# component: 'operator'
# yaml_file_path: 'helm-charts/splunk-otel-collector/Chart.yaml'
# dependency_name: 'opentelemetry-operator'
env:
DEBUG_MODE: ${{ github.event.inputs.DEBUG_MODE }}
steps:
Expand Down
30 changes: 30 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Upgrade guidelines

# 0.100.0 to 0.100.1

Feature gates for controlling instrumentation in the operator have been replaced with command-line arguments.
This update primarily affects users of non-Splunk distributions like apache-httpd, go, nginx, and python, which are now disabled by default.

If you were using `operator.manager.featureGates`, convert previous feature gates to command-line arguments in `operator.manager.extraArgs`. See below for summary of release changes:
- `+operator.autoinstrumentation.java` becomes `--enable-java-instrumentation=true`
- `+operator.autoinstrumentation.nodejs` becomes `--enable-nodejs-instrumentation=true`
- `+operator.autoinstrumentation.dotnet` becomes `--enable-dotnet-instrumentation=true`
- `+operator.autoinstrumentation.apache-httpd` becomes `--enable-apache-httpd-instrumentation=false`
- `-operator.autoinstrumentation.go` becomes `--enable-go-instrumentation=false`
- `-operator.autoinstrumentation.nginx` becomes `--enable-nginx-instrumentation=false`
- `+operator.autoinstrumentation.python` becomes `--enable-python-instrumentation=false`
dmitryax marked this conversation as resolved.
Show resolved Hide resolved

If you want to maintain the same level of instrumentation availability as before, configure your `operator` settings as follows:
```yaml
operator:
manager:
extraArgs:
- --enable-java-instrumentation=true
- --enable-nodejs-instrumentation=true
- --enable-dotnet-instrumentation=true
- --enable-apache-httpd-instrumentation=true
- --enable-go-instrumentation=false
- --enable-nginx-instrumentation=false
- --enable-python-instrumentation=true
```

If you need to enable a specific instrumentation, such as Go, update the value of `operator.manager.extraArgs` as needed.

# 0.93.0 to 0.94.0

The `networkExplorer` option is removed.
Expand Down
6 changes: 2 additions & 4 deletions ci_scripts/update-images-operator-otel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ awk '/# Auto-instrumentation Libraries \(Start\)/,/# Auto-instrumentation Librar

# ---- Update Image Information ----
while IFS='=' read -r IMAGE_KEY VERSION; do
NEED_UPDATE="${NEED_UPDATE:-0}" # Sets NEED_UPDATE to its current value or 0 if not set
if [[ "$IMAGE_KEY" =~ ^autoinstrumentation-.* ]]; then
# Upstream Operator Values
setd "INST_LIB_NAME" "${IMAGE_KEY#autoinstrumentation-}"
Expand Down Expand Up @@ -90,6 +89,8 @@ while IFS='=' read -r IMAGE_KEY VERSION; do
echo "Upserting value for ${REPOSITORY_LOCAL}:${TAG_UPSTREAM}"
yq eval -i ".${TAG_LOCAL_PATH} = \"${TAG_UPSTREAM}\"" "${TEMP_VALUES_FILE}"
setd "NEED_UPDATE" 1
# Emit the NEED_UPDATE variable to either GitHub output or stdout
emit_output "NEED_UPDATE"
else
echo "Failed to find Docker image $IMAGE. Check image repository and tag."
exit 1
Expand All @@ -104,9 +105,6 @@ while IFS='=' read -r IMAGE_KEY VERSION; do
fi
done < "${TEMP_VERSIONS}"

# Emit the NEED_UPDATE variable to either GitHub output or stdout
emit_output "NEED_UPDATE"

# Merge the updated subsection back into values.yaml
# This approach specifically updates only the subsection between the start and end tokens.
# By doing so, we avoid reformatting the entire file, thus preserving the original structure and comments.
Expand Down
36 changes: 20 additions & 16 deletions docs/auto-instrumentation-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,22 +371,26 @@ Below is a breakdown of the main and related components involved in auto-instrum

### Instrumentation Libraries

In the table below current instrumentation libraries are listed, if they are supported, and how compatible they are
with Splunk customer content.
_The native OpenTelemetry instrumentation libraries are owned and maintained by the OpenTelemetry Community, Splunk
provides best effort support with issues related to native OpenTelemetry instrumentation libraries._

| Instrumentation Library | Distribution | Status | Supported | Splunk Content Compatability | Code Repo | Image Repo |
|-------------------------|---------------|-------------|------------------|------------------------------|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| java | Splunk | Available | Yes | Completely | [Link](github.com/signalfx/splunk-otel-java) | ghcr.io/signalfx/splunk-otel-java/splunk-otel-java |
| dotnet | Splunk | Coming Soon | | | [Link](github.com/signalfx/splunk-otel-dotnet) | |
| nodejs | Splunk | Available | Yes | Completely | [Link](github.com/signalfx/splunk-otel-nodejs) | ghcr.io/signalfx/splunk-otel-java/splunk-otel-js |
| python | Splunk | Coming Soon | | | [Link](github.com/signalfx/splunk-otel-python) | |
| java | OpenTelemetry | Available | Yes | Mostly | [Link](https://github.com/open-telemetry/opentelemetry-java-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java |
| dotnet | OpenTelemetry | Available | Yes | Mostly | [Link](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-dotnet |
| nodejs | OpenTelemetry | Available | Yes | Mostly | [Link](https://github.com/open-telemetry/opentelemetry-nodejs-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodes |
| python | OpenTelemetry | Available | Needs Validation | | [Link](https://github.com/open-telemetry/opentelemetry-java-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java |
| apache-httpd | OpenTelemetry | Available | Needs Validation | | [Link](https://github.com/open-telemetry/opentelemetry-apache-httpd-instrumentation) | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd |
The table below lists the current instrumentation libraries, their availability, and their compatibility with Splunk customer content.
_Note: Native OpenTelemetry instrumentation libraries are owned and maintained by the OpenTelemetry Community. Splunk provides best effort support for issues related to these libraries._

| Instrumentation Language | Distribution | Command Line Arg Name | Command Line Arg Default Value | Status | Splunk Content Compatibility | Source URL | Image Repository |
|--------------------------|----------------|---------------------------------------------|--------------------------------|----------------|------------------------------|-------------------------------------------------------------|--------------------------------------------------------------------------------|
| Java | Splunk | `operator.autoinstrumentation.java` | true | Stable | Fully Compatible | https://github.com/signalfx/splunk-otel-java | ghcr.io/signalfx/splunk-otel-java/splunk-otel-java |
| NodeJS | Splunk | `operator.autoinstrumentation.nodejs` | true | Stable | Fully Compatible | https://github.com/signalfx/splunk-otel-js | ghcr.io/signalfx/splunk-otel-java/splunk-otel-js |
| DotNet | Splunk | `operator.autoinstrumentation.dotnet` | true | Stable | Fully Compatible | https://github.com/signalfx/splunk-otel-dotnet | ghcr.io/signalfx/splunk-otel-java/splunk-otel-dotnet |
| ApacheHttpD | OpenTelemetry | `operator.autoinstrumentation.apache-httpd` | false | Experimental | Partially Compatible | https://github.com/open-telemetry/opentelemetry-cpp-contrib | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd |
| Go | OpenTelemetry | `operator.autoinstrumentation.go` | false | Experimental | Partially Compatible | https://github.com/open-telemetry/opentelemetry-go | ghcr.io/open-telemetry/opentelemetry-go-instrumentation/autoinstrumentation-go |
| Nginx | OpenTelemetry | `operator.autoinstrumentation.nginx` | false | Experimental | Partially Compatible | https://github.com/open-telemetry/opentelemetry-cpp-contrib | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd |
| Python | Splunk | `operator.autoinstrumentation.python` | false | Experimental | Partially Compatible | https://github.com/open-telemetry/opentelemetry-python | ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python |

#### Steps to Enable Instrumentation with Command Line Arg

1. **Identify the Argument**: Each instrumentation library has a corresponding command line arg that controls its activation, as listed in the table of instrumentation languages.

2. **Modify Helm Values File**: Open your Helm values file where the OpenTelemetry Operator configuration is defined. Locate the `operator.manager.extraArgs` section.

3. **Update the Argument**: To enable an experimental library, update the corresponding command line arg. It should be in the format of `operator.autoinstrumentation.{language}={true|false}`.

### Documentation Resources

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,19 @@ spec:
- --health-probe-addr=:8081
- --webhook-port=9443
- --collector-image=otel/opentelemetry-collector-contrib:0.95.0
- --enable-java-instrumentation=true
- --enable-nodejs-instrumentation=true
- --enable-dotnet-instrumentation=true
- --enable-apache-httpd-instrumentation=false
- --enable-go-instrumentation=false
- --enable-nginx-instrumentation=false
- --enable-python-instrumentation=false
command:
- /manager
env:
- name: ENABLE_WEBHOOKS
value: "true"
image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.95.0"
image: "ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.99.0"
name: manager
ports:
- containerPort: 8080
Expand Down
1 change: 1 addition & 0 deletions functional_tests/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ func testNodeJSTraces(t *testing.T) {
ptracetest.IgnoreResourceAttributeValue("os.version"),
ptracetest.IgnoreResourceAttributeValue("host.arch"),
ptracetest.IgnoreResourceAttributeValue("telemetry.sdk.version"),
ptracetest.IgnoreResourceAttributeValue("service.instance.id"),
ptracetest.IgnoreResourceAttributeValue("splunk.distro.version"),
ptracetest.IgnoreResourceAttributeValue("splunk.zc.method"),
ptracetest.IgnoreSpanAttributeValue("net.peer.port"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ resourceSpans:
- key: service.name
value:
stringValue: nodejs-test
- key: service.instance.id
value:
stringValue: default.nodejs-test-d454cf769-f786k.nodejs-test
- key: telemetry.sdk.language
value:
stringValue: nodejs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ resourceSpans:
- key: service.name
value:
stringValue: nodejs-test
- key: service.instance.id
value:
stringValue: default.nodejs-test-d454cf769-f786k.nodejs-test
- key: telemetry.sdk.language
value:
stringValue: nodejs
Expand Down
8 changes: 4 additions & 4 deletions helm-charts/splunk-otel-collector/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Splunk OpenTelemetry Collector is installed and configured to send data to Splun
Upgrade guidelines: https://github.com/signalfx/splunk-otel-collector-chart/blob/main/UPGRADING.md#0670-to-0680
{{ end }}
{{- if .Values.operator.enabled }}
[INFO] You've enabled the operator's auto-instrumentation feature (operator.enabled=true), currently considered ALPHA.
- Instrumentation library maturity varies (e.g., Java is more mature than Go). For library stability, visit: https://opentelemetry.io/docs/instrumentation/#status-and-releases
- Some libraries may be enabled by default. For current status, see: https://github.com/open-telemetry/opentelemetry-operator#controlling-instrumentation-capabilities
- Splunk provides best-effort support for native OpenTelemetry libraries, and full support for Splunk library distributions. For used libraries, refer to the values.yaml under "operator.instrumentation.spec".
[INFO] You've enabled the operator's auto-instrumentation feature (operator.enabled=true)! The operator can automatically instrument Kubernetes hosted applications, the integration maturity can vary per application language.
- Status: Instrumentation language maturity varies. See `operator.instrumentation.spec` and documentation for utilized instrumentation details.
- Usage: Certain instrumentation languages are enabled by default while other must be enabled manually using `operator.manager.extraArgs`.
- Splunk Support: We offer full support for Splunk distributions and best-effort support for native OpenTelemetry instrumentation distributions of instrumentation language libraries.
{{- end }}
28 changes: 24 additions & 4 deletions helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,7 @@ operator:
# - repository: Specifies the Docker image repository.
# - tag: Indicates the Docker image tag.
# - env: (Optional) Allows you to add any additional environment variables.
# Auto-instrumentation for the various languages that are distributed by Splunk or OpenTelemetry.
java:
repository: ghcr.io/signalfx/splunk-otel-java/splunk-otel-java
tag: v1.31.0
Expand All @@ -1206,19 +1207,38 @@ operator:
env:
- name: OTEL_DOTNET_AUTO_PLUGINS
value: Splunk.OpenTelemetry.AutoInstrumentation.Plugin, Splunk.OpenTelemetry.AutoInstrumentation
# Disabled by default. To enable, update "operator.manager.extraArgs" to include "--enable-apache-httpd-instrumentation=true".
apache-httpd:
repository: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd
tag: 1.0.4
# Disabled by default. To enable, update "operator.manager.extraArgs" to include "--enable-go-instrumentation=true".
go:
repository: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-go
tag: v0.10.1-alpha
apache-httpd:
# Disabled by default. To enable, update "operator.manager.extraArgs" to include "--enable-nginx-instrumentation=true".
nginx:
repository: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd
tag: 1.0.4
# Disabled by default. To enable, update "operator.manager.extraArgs" to include "--enable-python-instrumentation=true".
python:
jvoravong marked this conversation as resolved.
Show resolved Hide resolved
repository: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-python
tag: 0.44b0
nginx:
repository: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-apache-httpd
tag: 1.0.4
# Auto-instrumentation Libraries (End)
manager:
# TODO: Remove overriding the operator version once this chart has been updated to adhere to
# the operator chart schema validation rules. See: https://github.com/open-telemetry/opentelemetry-helm-charts/pull/1065
image:
repository: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
tag: "0.99.0"
# Configure operator manager command-line args.
extraArgs:
- --enable-java-instrumentation=true
- --enable-nodejs-instrumentation=true
- --enable-dotnet-instrumentation=true
- --enable-apache-httpd-instrumentation=false
- --enable-go-instrumentation=false
- --enable-nginx-instrumentation=false
- --enable-python-instrumentation=false
admissionWebhooks:
certManager:
# Annotate the certificate and issuer to ensure they are created after the cert-manager CRDs have been installed.
Expand Down
Loading