Skip to content

Commit c4ac3a8

Browse files
committed
Change to OTEL Nais Autoinstrumentation
1 parent ef05b8b commit c4ac3a8

File tree

4 files changed

+16
-28
lines changed

4 files changed

+16
-28
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ RUN apt-get update && apt-get install -y \
88

99
WORKDIR /app
1010

11-
RUN curl -L -O https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
12-
1311
ENV TZ="Europe/Oslo"
1412

1513
ENV MAIN_CLASS=no.nav.pensjon.pen_app.PenApplication

java-opts.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/usr/bin/env sh
22

3-
if [ ! -z "${OTEL_EXPORTER_OTLP_ENDPOINT}" ]; then
4-
JAVA_OPTS="${JAVA_OPTS} -javaagent:/app/opentelemetry-javaagent.jar"
5-
fi
6-
73
if test -r "${NAV_TRUSTSTORE_PATH}";
84
then
95
if ! keytool -list -keystore ${NAV_TRUSTSTORE_PATH} -storepass "${NAV_TRUSTSTORE_PASSWORD}" > /dev/null;

nais/nais-dev.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,15 @@ spec:
9797
value: "https://norg2.intern.dev.nav.no/norg2"
9898
- name: "STS_WELL_KNOWN_URL"
9999
value: "https://security-token-service.nais.preprod.local/.well-known/openid-configuration"
100-
101-
# Manual setup of OpenTelemetry because it's not "natively" supported on FSS yet.
102-
- name: "OTEL_EXPORTER_OTLP_ENDPOINT"
103-
value: "https://elastic-apm.adeo.no"
104-
- name: "OTEL_METRICS_EXPORTER"
105-
value: "otlp"
106-
- name: "OTEL_LOGS_EXPORTER"
107-
value: "otlp"
108100
- name: "OTEL_RESOURCE_ATTRIBUTES"
109-
value: "service.name=navansatt,service.version=navansatt,deployment.environment=q2"
110-
- name: "OTEL_TRACES_EXPORTER"
111-
value: "otlp"
101+
value: "deployment.environment.name=q2"
102+
observability:
103+
autoInstrumentation:
104+
enabled: true
105+
runtime: java
106+
destinations:
107+
- id: grafana-lgtm
108+
- id: elastic-apm
112109
vault:
113110
enabled: true
114111
paths:

nais/nais-prod.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,15 @@ spec:
6666
value: "https://norg2.intern.nav.no/norg2"
6767
- name: "STS_WELL_KNOWN_URL"
6868
value: "https://security-token-service.nais.adeo.no/.well-known/openid-configuration"
69-
70-
# Manual setup of OpenTelemetry because it's not "natively" supported on FSS yet.
71-
- name: "OTEL_EXPORTER_OTLP_ENDPOINT"
72-
value: "https://elastic-apm.adeo.no"
73-
- name: "OTEL_METRICS_EXPORTER"
74-
value: "otlp"
75-
- name: "OTEL_LOGS_EXPORTER"
76-
value: "otlp"
7769
- name: "OTEL_RESOURCE_ATTRIBUTES"
78-
value: "service.name=navansatt,service.version=navansatt,deployment.environment=p"
79-
- name: "OTEL_TRACES_EXPORTER"
80-
value: "otlp"
70+
value: "deployment.environment.name=p"
71+
observability:
72+
autoInstrumentation:
73+
enabled: true
74+
runtime: java
75+
destinations:
76+
- id: grafana-lgtm
77+
- id: elastic-apm
8178
vault:
8279
enabled: true
8380
paths:

0 commit comments

Comments
 (0)