Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test scenario for DJM with java lib injection #3500

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

yiliangzhou
Copy link

@yiliangzhou yiliangzhou commented Nov 20, 2024

Motivation

Data Jobs Monitoring (DJM) use Single Step Instrumentation to inject Java tracer to Spark application launched in k8s. The newly added test scenario K8S_LIBRARY_INJECTION_DJM allow us to verify the k8s injection continue to work for Data Jobs Monitoring as new Java tracer, new auto_inject, and new cluster_agent are being released.

Changes

  • new Java weblog variant, dd-djm-spark-test-app, to launch a sample spark application in k8s with DJM related setting (e.x tracer config to enable Spark integration, Spark driver pod annotation to inject java tracer)
  • new k8s injection test scenario K8S_LIBRARY_INJECTION_DJM to test spark application in k8s with DJM enabled. The single test case verify spark.application trace are received from the instrumented sample Spark application launched by newly added Java weblog variant (the test case is illustrated roughly as below).
Screenshot 2024-11-26 at 7 59 46 PM
  • update the Github workflow definition file to include K8S_LIBRARY_INJECTION_DJM test scenario in k8s-lib-injection-tests.
  • exclude dd-djm-spark-test-app weblog variant for other irrelevant tests.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

Copy link
Collaborator

@robertomonteromiguel robertomonteromiguel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to fix the lint failures to test the PR. Use the ./format.sh command

tests/k8s_lib_injection/test_k8s_djm_with_ssi.py Outdated Show resolved Hide resolved
tests/k8s_lib_injection/test_k8s_djm_with_ssi.py Outdated Show resolved Hide resolved
utils/_context/_scenarios/__init__.py Show resolved Hide resolved
@yiliangzhou yiliangzhou added the build-lib-injection-app-images Build and push weblog images for lib-injection label Nov 26, 2024
@yiliangzhou yiliangzhou marked this pull request as ready for review November 26, 2024 22:30
@yiliangzhou yiliangzhou requested a review from a team as a code owner November 26, 2024 22:30
@yiliangzhou yiliangzhou marked this pull request as draft November 26, 2024 22:31
@yiliangzhou yiliangzhou marked this pull request as ready for review November 27, 2024 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-lib-injection-app-images Build and push weblog images for lib-injection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants