Skip to content

Commit 915d7a4

Browse files
committed
add instance type to nap logs
1 parent b06c66b commit 915d7a4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

internal/collector/otel_collector_plugin.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,13 @@ func (oc *Collector) updateNginxAppProtectTcplogReceivers(
623623
"value": nginxConfigContext.InstanceID,
624624
},
625625
},
626+
{
627+
Type: "add",
628+
Fields: map[string]string{
629+
"field": "resource[\"instance.type\"]",
630+
"value": "nginx-app-protect",
631+
},
632+
},
626633
},
627634
}
628635

test/docker/nginx-plus-and-nap/deb/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ RUN --mount=type=secret,id=nginx-crt,dst=nginx-repo.crt \
5454
&& echo "Acquire::https::pkgs.nginx.com::Verify-Host \"true\";" >> /etc/apt/apt.conf.d/90nginx \
5555
&& echo "Acquire::https::pkgs.nginx.com::SslCert \"/etc/ssl/nginx/nginx-repo.crt\";" >> /etc/apt/apt.conf.d/90nginx \
5656
&& echo "Acquire::https::pkgs.nginx.com::SslKey \"/etc/ssl/nginx/nginx-repo.key\";" >> /etc/apt/apt.conf.d/90nginx \
57-
&& printf "deb https://pkgs.nginx.com/plus/${PLUS_VERSION}/ubuntu/ `lsb_release -cs` nginx-plus\n" > /etc/apt/sources.list.d/nginx-plus.list \
57+
&& printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/plus/${PLUS_VERSION}/ubuntu/ `lsb_release -cs` nginx-plus\n" > /etc/apt/sources.list.d/nginx-plus.list \
5858
&& printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://pkgs.nginx.com/app-protect/${PLUS_VERSION}/ubuntu `lsb_release -cs` nginx-plus\n" | tee /etc/apt/sources.list.d/nginx-app-protect.list \
5959
&& printf "deb [signed-by=/usr/share/keyrings/app-protect-security-updates.gpg] https://pkgs.nginx.com/app-protect-security-updates/ubuntu `lsb_release -cs` nginx-plus\n" | tee -a /etc/apt/sources.list.d/nginx-app-protect.list \
6060
&& mkdir -p /etc/ssl/nginx \

0 commit comments

Comments
 (0)