Conversation
|
I really like the concept of this test! Using the debug exporter and looking at otel container logs is simple, and lets us verify the SDK is emitting logs, if not their full content and metadata. That said, this PR essentially reimplements a lot of what our e2e test framework already does, like:
So I'd love this test to be reimagined as a chainsaw test similar to https://github.com/open-telemetry/opentelemetry-operator/tree/main/tests/e2e-openshift/otlp-metrics-traces. It's for openshift, but it shows how you can include a bash script in the test to verify that you see the logs you expect. This way, the test is easy to run locally as well. |
|
Alright, so you do have integration tests! (sorry I didn't see them back then) There's a bit of triage here, we can split this into more specific tickets:
|
Strictly speaking, we require cert-manager right now. CSRs do work, but we have neither documentation nor tests involving them. If you'd like to add that, it should definitely be a separate issue.
It's not a requirement, but the operator does a bunch of bookeeping for us, so the manifest is smaller. For autoinstrumentation, see https://github.com/open-telemetry/opentelemetry-operator/tree/main/tests/e2e-instrumentation. These tests don't look at emitted data though, just that injection was successful and set the right environment variables, and that the instrumented application started successfully afterwards.
That's just an example to show how you can use a custom bash script in a chainsaw test. The majority of our tests don't have anything to do with openshift and run in kind without issue.
I consider it a requirement. Do you encounter any issues running |
| - name: Deploy operator instrumentation CRDs | ||
| run: kubectl apply -f tests/integration/crd-opentelemetryinstrumentation.yaml | ||
| - name: Deploy operator opampbridge CRDs | ||
| run: kubectl apply -f tests/integration/crd-opampbridges.yaml | ||
| - name: Deploy instrumentation | ||
| run: kubectl apply -f tests/integration/instrumentation.yaml |
There was a problem hiding this comment.
If we're already checking out, could we just apply the CRDs found in here?
| run: kubectl apply -f tests/integration/crd-opampbridges.yaml | ||
| - name: Deploy instrumentation | ||
| run: kubectl apply -f tests/integration/instrumentation.yaml | ||
| - name: Sleep 10s |
There was a problem hiding this comment.
I think we should find a better way to do this instead of sleep.
| @@ -0,0 +1,61 @@ | |||
| name: CI | |||
There was a problem hiding this comment.
I see this test as something that can be run using chainsaw.
|
I am going to rewrite this test with chainsaw. |
|
related from @IshwarKanse #3888 |
Relates to #3662
This PR adds a new integration test that builds the webhook, the java autoinstrumentation image, deploys both alongside Tomcat in a kind cluster and checks from the collector that Tomcat logs are captured.
This test is a start to show how we can build integration tests for this product. This type of test will help identify regressions.