Skip to content

Commit

Permalink
write traces received to output folder for debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
yiliangzhou committed Nov 22, 2024
1 parent 2e2b0d1 commit e21356e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/k8s_lib_injection/test_k8s_djm_with_ssi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import time

import requests
import json

from utils import scenarios, features, context, irrelevant
from utils.tools import logger
from utils import scenarios, features
Expand Down Expand Up @@ -39,7 +41,11 @@ def test_spark_instrumented_with_ssi(self, test_k8s_instance):

traces_json = self._get_dev_agent_traces(test_k8s_instance.k8s_kind_cluster)

logger.debug(f"Traces received: {traces_json}")
logger.info(f"Traces received: {traces_json}")
# TODO: remove this once we have a better way to inspect traces
with open(f"{test_k8s_instance.output_folder}/traces.json", "w") as f:
f.write(json.dumps(traces_json, indent=4))

assert len(traces_json) > 0, "No traces found"
assert any("spark.application" in trace for trace in traces_json), "No spark.application traces found"

Expand Down

0 comments on commit e21356e

Please sign in to comment.