Knowledge check¶
Test your understanding of Monocle zero-code instrumentation and Okahu for CI/CD pipelines.
1. What is the key difference between zero-code and in-code instrumentation?¶
Correct! Zero-code instrumentation reads okahu.yaml and dynamically wraps methods at runtime via python -m monocle_apptrace --config okahu.yaml app.py. The application source code is never modified.
Incorrect. Zero-code instrumentation reads okahu.yaml and dynamically wraps methods at runtime via python -m monocle_apptrace --config okahu.yaml app.py. The application source code is never modified.
2. In okahu.yaml, what does inputs.include: [param1, param2] do?¶
Correct! Monocle records the actual argument values as JSON in a data.input span event, making them available for trace analysis and debugging.
Incorrect. Monocle records the actual argument values as JSON in a data.input span event, making them available for trace analysis and debugging.
3. Why does the workflow wait before querying Okahu for traces after a run?¶
Correct! Traces are sent to Okahu's ingestion endpoint during the run, but they need a few seconds to be processed and indexed before the API can return them in queries.
Incorrect. Traces are sent to Okahu's ingestion endpoint during the run, but they need a few seconds to be processed and indexed before the API can return them in queries.
4. How does the Okahu API identify which traces belong to a specific CI/CD run?¶
Correct! Scope-based fact lookup lets you query ?duration_fact=test_runs&fact_ids=github_{RUN_ID} to get only the traces tagged with that specific run ID.
Incorrect. Scope-based fact lookup lets you query ?duration_fact=test_runs&fact_ids=github_{RUN_ID} to get only the traces tagged with that specific run ID.
5. What does Monocle capture in data.output when an instrumented method raises an exception before returning?¶
Correct! Since the method raised an exception before returning, Monocle captures None as the output. The Kahu SRE Agent sees None output combined with a failed span status and uses this to diagnose the issue.
Incorrect. Since the method raised an exception before returning, Monocle captures None as the output. The Kahu SRE Agent sees None output combined with a failed span status and uses this to diagnose the issue.
6. Can you combine zero-code YAML instrumentation with in-code setup_monocle_telemetry in the same application?¶
Correct! Both approaches produce spans in the same trace. This is useful when part of your application uses a supported framework (LangChain, ADK) and part is custom code.
Incorrect. Both approaches produce spans in the same trace. This is useful when part of your application uses a supported framework (LangChain, ADK) and part is custom code.
7. How does the Kahu SRE Agent use Monocle trace data to perform root cause analysis?¶
Correct! The Kahu SRE Agent queries traces from Okahu and examines each span's metadata — including captured inputs, outputs, status, and duration — to produce a structured root cause analysis.
Incorrect. The Kahu SRE Agent queries traces from Okahu and examines each span's metadata — including captured inputs, outputs, status, and duration — to produce a structured root cause analysis.