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

feat: bump apache httpd and nginx instrumentation to latest version #3488

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .chloggen/bump-apache-httpd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 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. collector, target allocator, auto-instrumentation, opamp, github action)
component: auto-instrumentation

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Bump Apache httpd version

# One or more tracking issues related to the change
issues: [3487]

# (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:
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ List of all available attributes can be found at [otel-webserver-module](https:/

#### Using Nginx autoinstrumentation

For `Nginx` autoinstrumentation, Nginx versions 1.22.0, 1.23.0, and 1.23.1 are supported at this time. The Nginx configuration file is expected to be `/etc/nginx/nginx.conf` by default, if it's different, see following example on how to change it. Instrumentation at this time also expects, that `conf.d` directory is present in the directory, where configuration file resides and that there is a `include <config-file-dir-path>/conf.d/*.conf;` directive in the `http { ... }` section of Nginx configuration file (like it is in the default configuration file of Nginx). You can also adjust OpenTelemetry SDK attributes. Example:
For `Nginx` autoinstrumentation, Nginx versions 1.22.0, 1.23.0, 1.23.1, 1.24.0, 1.25.3, 1.25.5, and 1.26.0 are supported at this time. The Nginx configuration file is expected to be `/etc/nginx/nginx.conf` by default, if it's different, see following example on how to change it. Instrumentation at this time also expects, that `conf.d` directory is present in the directory, where configuration file resides and that there is a `include <config-file-dir-path>/conf.d/*.conf;` directive in the `http { ... }` section of Nginx configuration file (like it is in the default configuration file of Nginx). You can also adjust OpenTelemetry SDK attributes. Example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you confident all of these versions are actually supported? When we previously bumped this, there was some disagreement over this.

Copy link
Author

Choose a reason for hiding this comment

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

I was just basing this off of the release notes. 1.24.0 and 1.25.3 were added in 1.0.4 and 1.26.0 and 1.25.5 were added in 1.1.0. Support for 1.22.0, 1.23.0, and 1.23.1 correspond with the release notes for version 1.0.2, and in 1.0.3 no change in supported versions was noted. So it seems like the supported versions weren't added for the 1.0.4 release. But I'm purely basing this off the notes here. I haven't actually deployed or tested anything yet, I just noted the outdated version and thought I'd help update it as it seemed simple enough.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is the instrumentation we test the least, so I'm always a bit more cautious when the version is bumped. For example, if you look at the README, it claims to only support 1.24 and 1.25.

On the other hand, it looks like this was already the case for 1.0.4, which we blindly upgraded to without any complaints, so maybe this instrumentation simply isn't used that much, or its users carefully set the image tag in their CRs.

@pavolloffay @jaronoff97 @frzifus WDYT? Do we just bite the bullet and upgrade?

Copy link
Author

Choose a reason for hiding this comment

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

@swiatekm I just checked the created container and it the versions 1.25.5 and 1.26.0 in it for NGINX.

Copy link
Member

Choose a reason for hiding this comment

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

Can we extend the test for some period of time to just check a few versions at the same time? wdyt?


```yaml
apiVersion: opentelemetry.io/v1alpha1
Expand Down
8 changes: 4 additions & 4 deletions autoinstrumentation/apache-httpd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

############################
# STEP 1 download the webserver agent
# STEP 1 download the webserver agent
############################
FROM alpine:latest as agent
FROM alpine:latest AS agent

ARG version

Expand All @@ -11,10 +11,10 @@ WORKDIR /opt/opentelemetry

RUN mkdir agent
RUN wget -c https://github.com/open-telemetry/opentelemetry-cpp-contrib/releases/download/webserver%2Fv$version/opentelemetry-webserver-sdk-x64-linux.tgz
RUN unzip -p opentelemetry-webserver-sdk-x64-linux.tgz | tar -zx -C agent
RUN tar -xvf opentelemetry-webserver-sdk-x64-linux.tgz -C agent

############################
# STEP 2 download the webserver agent
# STEP 2 download the webserver agent
############################
FROM alpine:latest

Expand Down
2 changes: 1 addition & 1 deletion autoinstrumentation/apache-httpd/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.4
1.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: myapp
image: nginxinc/nginx-unprivileged:1.25.3
image: nginxinc/nginx-unprivileged:1.26.0
imagePullPolicy: Always
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
fsGroup: 3000
containers:
- name: myapp
image: nginxinc/nginx-unprivileged:1.25.3
image: nginxinc/nginx-unprivileged:1.26.0
imagePullPolicy: Always
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
fsGroup: 3000
containers:
- name: myapp
image: nginxinc/nginx-unprivileged:1.25.3
image: nginxinc/nginx-unprivileged:1.26.0
imagePullPolicy: Always
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
fsGroup: 3000
containers:
- name: myapp
image: nginxinc/nginx-unprivileged:1.25.3
image: nginxinc/nginx-unprivileged:1.26.0
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
Expand Down
4 changes: 2 additions & 2 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ autoinstrumentation-go=v0.17.0-alpha

# Represents the current release of Apache HTTPD instrumentation.
# Should match autoinstrumentation/apache-httpd/version.txt
autoinstrumentation-apache-httpd=1.0.4
autoinstrumentation-apache-httpd=1.1.0

# Represents the current release of Apache Nginx instrumentation.
# Should match autoinstrumentation/apache-httpd/version.txt
autoinstrumentation-nginx=1.0.4
autoinstrumentation-nginx=1.1.0
Loading