Skip to content

Commit

Permalink
e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuraag Agrawal committed Nov 10, 2021
1 parent 50785ae commit cff5521
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/e2e/instrumentation-nodejs/00-install-collector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: sidecar
spec:
mode: sidecar
args:
metrics-level: detailed
config: |
receivers:
otlp:
protocols:
grpc:
http:
processors:
exporters:
logging:
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging]
12 changes: 12 additions & 0 deletions tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
name: nodejs
spec:
exporter:
endpoint: http://localhost:4317
propagators:
- jaeger
- b3
nodejs:
image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-nodejs:latest
30 changes: 30 additions & 0 deletions tests/e2e/instrumentation-nodejs/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: v1
kind: Pod
metadata:
annotations:
sidecar.opentelemetry.io/inject: "true"
instrumentation.opentelemetry.io/inject-nodejs: "true"
labels:
app: my-pod-with-sidecar
spec:
containers:
- name: myapp
env:
- name: OTEL_SERVICE_NAME
value: myapp
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
- name: OTEL_RESOURCE_ATTRIBUTES
- name: OTEL_PROPAGATORS
value: jaeger,b3
- name: NODE_OPTIONS
value: " --require /otel-auto-instrumentation/autoinstrumentation.js"
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
- mountPath: /otel-auto-instrumentation
name: opentelemetry-auto-instrumentation
- name: otc-container
initContainers:
- name: opentelemetry-auto-instrumentation
status:
phase: Running
20 changes: 20 additions & 0 deletions tests/e2e/instrumentation-nodejs/01-install-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-deployment-with-sidecar
spec:
selector:
matchLabels:
app: my-pod-with-sidecar
replicas: 1
template:
metadata:
labels:
app: my-pod-with-sidecar
annotations:
sidecar.opentelemetry.io/inject: "true"
instrumentation.opentelemetry.io/inject-nodejs: "true"
spec:
containers:
- name: myapp
image: ghcr.io/anuraaga/express-hello-world:latest

0 comments on commit cff5521

Please sign in to comment.