Skip to content

Commit

Permalink
update e2e testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncan-tree-zhou committed Jan 25, 2022
1 parent dadd4da commit 03b20b4
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 24 deletions.
19 changes: 17 additions & 2 deletions tests/e2e/instrumentation-java/00-install-instrumentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,26 @@ kind: Instrumentation
metadata:
name: java
spec:
exporter:
endpoint: http://localhost:4317
env:
- name: OTEL_TRACES_EXPORTER
value: otlp
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
- name: OTEL_EXPORTER_OTLP_TIMEOUT
value: "20"
- name: OTEL_TRACES_SAMPLER
value: parentbased_traceidratio
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.85"
propagators:
- jaeger
- b3
sampler:
type: parentbased_traceidratio
argument: "0.25"
java:
env:
- name: OTEL_JAVAAGENT_DEBUG
value: "true"
- name: OTEL_INSTRUMENTATION_JDBC_ENABLED
value: "false"
24 changes: 16 additions & 8 deletions tests/e2e/instrumentation-java/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,29 @@ spec:
containers:
- name: myapp
env:
- name: OTEL_SERVICE_NAME
value: my-deployment-with-sidecar
- name: OTEL_JAVAAGENT_DEBUG
value: "true"
- name: OTEL_INSTRUMENTATION_JDBC_ENABLED
value: "false"
- name: JAVA_TOOL_OPTIONS
value: " -javaagent:/otel-auto-instrumentation/javaagent.jar"
- name: OTEL_TRACES_EXPORTER
value: otlp
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
- name: OTEL_EXPORTER_OTLP_TIMEOUT
value: "20"
- name: OTEL_TRACES_SAMPLER
value: parentbased_traceidratio
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.85"
- name: OTEL_SERVICE_NAME
value: my-deployment-with-sidecar
- name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME
- name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
- name: OTEL_RESOURCE_ATTRIBUTES
- name: OTEL_PROPAGATORS
value: jaeger,b3
- name: OTEL_TRACES_SAMPLER
value: parentbased_traceidratio
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.25"
- name: JAVA_TOOL_OPTIONS
value: " -javaagent:/otel-auto-instrumentation/javaagent.jar"
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
- mountPath: /otel-auto-instrumentation
Expand Down
21 changes: 19 additions & 2 deletions tests/e2e/instrumentation-nodejs/00-install-instrumentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,25 @@ kind: Instrumentation
metadata:
name: nodejs
spec:
exporter:
endpoint: http://localhost:4317
env:
- name: OTEL_TRACES_EXPORTER
value: otlp
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
- name: OTEL_EXPORTER_OTLP_TIMEOUT
value: "20"
- name: OTEL_TRACES_SAMPLER
value: parentbased_traceidratio
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.85"
propagators:
- jaeger
- b3
sampler:
type: parentbased_traceidratio
argument: "0.25"
nodejs:
env:
- name: OTEL_NODEJS_DEBUG
value: "true"

18 changes: 14 additions & 4 deletions tests/e2e/instrumentation-nodejs/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,27 @@ spec:
containers:
- name: myapp
env:
- name: OTEL_SERVICE_NAME
value: my-deployment-with-sidecar
- name: OTEL_NODEJS_DEBUG
value: "true"
- name: NODE_OPTIONS
value: " --require /otel-auto-instrumentation/autoinstrumentation.js"
- name: OTEL_TRACES_EXPORTER
value: otlp
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
- name: OTEL_EXPORTER_OTLP_TIMEOUT
value: "20"
- name: OTEL_TRACES_SAMPLER
value: parentbased_traceidratio
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.85"
- name: OTEL_SERVICE_NAME
value: my-deployment-with-sidecar
- name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME
- name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
- 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
Expand Down
20 changes: 18 additions & 2 deletions tests/e2e/instrumentation-python/00-install-instrumentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,24 @@ kind: Instrumentation
metadata:
name: python
spec:
exporter:
endpoint: http://localhost:4318/v1/traces
env:
- name: OTEL_EXPORTER_OTLP_TIMEOUT
value: "20"
- name: OTEL_TRACES_SAMPLER
value: parentbased_traceidratio
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.85"
propagators:
- jaeger
- b3
sampler:
type: parentbased_traceidratio
argument: "0.25"
python:
env:
- name: OTEL_LOG_LEVEL
value: "debug"
- name: OTEL_TRACES_EXPORTER
value: otlp_proto_http
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
20 changes: 14 additions & 6 deletions tests/e2e/instrumentation-python/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,27 @@ spec:
containers:
- name: myapp
env:
- name: OTEL_LOG_LEVEL
value: "debug"
- name: OTEL_TRACES_EXPORTER
value: otlp_proto_http
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4317
- name: PYTHONPATH
value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation"
- name: OTEL_EXPORTER_OTLP_TIMEOUT
value: "20"
- name: OTEL_TRACES_SAMPLER
value: parentbased_traceidratio
- name: OTEL_TRACES_SAMPLER_ARG
value: "0.85"
- name: OTEL_SERVICE_NAME
value: my-deployment-with-sidecar
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://localhost:4318/v1/traces
- name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME
- name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
- name: OTEL_RESOURCE_ATTRIBUTES
- name: OTEL_PROPAGATORS
value: jaeger,b3
- name: PYTHONPATH
value: "/otel-auto-instrumentation/opentelemetry/instrumentation/auto_instrumentation:/otel-auto-instrumentation"
- name: OTEL_TRACES_EXPORTER
value: otlp_proto_http
volumeMounts:
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
- mountPath: /otel-auto-instrumentation
Expand Down

0 comments on commit 03b20b4

Please sign in to comment.