-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anuraag Agrawal
committed
Nov 10, 2021
1 parent
50785ae
commit cff5521
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
tests/e2e/instrumentation-nodejs/00-install-collector.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
12
tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |