test(llmobs): migrate llama_index tests to assert on LLMObsSpanData#17797
Conversation
Codeowners resolved as |
BenchmarksBenchmark execution time: 2026-04-30 18:58:54 Comparing candidate commit 6445ccc in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 584 metrics, 4 unstable metrics. scenario:iastaspects-lstrip_noaspect
scenario:iastaspectsospath-ospathbasename_aspect
scenario:telemetryaddmetric-1-count-metric-1-times
|
57b1e17 to
d6f7311
Compare
26b464d to
334ce20
Compare
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…x_llmobs fixture Mirrors the pydantic_ai pattern: a named opt-in fixture per integration enables LLMObs, sets _DD_LLMOBS_TEST_KEEP_META_STRUCT=1, mocks the writer, and injects _dd_api_key + _llmobs_ml_app + service via override_global_config. Tests request the fixture explicitly instead of activating LLMObs through the implicit ddtrace_global_config parametrize, and the class-level parametrize decorator (and the now-unused LLMOBS_GLOBAL_CONFIG dict) are gone. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…_llama_index fixtures The integration registers no config keys and no test parametrizes either fixture, so the override_config wrapper was a no-op. Inline the single-use default_global_config() helper as well. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ixture The base fixture's _dd_api_key override only takes effect for APM-only tests in test_llama_index.py — none of which read it (APM tracing routes through the trace agent, no api_key validation). The llama_index_llmobs fixture sets _dd_api_key independently for LLMObs tests, where the inner override shadows this one. Vestigial from before the llmobs fixture split. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
334ce20 to
7269cc6
Compare
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
error while getting head build completion result DetailsError: There was an error while retrieving the result for pipeline 111357059 FullStacktrace: |
wantsui
left a comment
There was a problem hiding this comment.
Approving from an integrations perspective since this change is limited to LLM.
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
Tests failed on this commit 56ea6d7: What to do next?
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
…17797) Migrates llama_index LLMObs tests from inspecting projected wire `LLMObsSpanEvent`s (via `mock_llmobs_writer.enqueue.*` / `llmobs_events`) to reading the canonical `LLMObsSpanData` directly off `span.meta_struct["_llmobs"]` and asserting via `assert_llmobs_span_data(_get_llmobs_data_metastruct(spans[i]), ...)`. Conftest: replaces the `test_spans` override / `mock_llmobs_writer` plumbing with a `llama_index_llmobs(tracer, monkeypatch)` fixture that sets `_DD_LLMOBS_TEST_KEEP_META_STRUCT=1`, enables LLMObs against the test tracer, and mocks the span writer. Stacked on #17789. Co-authored-by: yun.kim <yun.kim@datadoghq.com>
…17797) Migrates llama_index LLMObs tests from inspecting projected wire `LLMObsSpanEvent`s (via `mock_llmobs_writer.enqueue.*` / `llmobs_events`) to reading the canonical `LLMObsSpanData` directly off `span.meta_struct["_llmobs"]` and asserting via `assert_llmobs_span_data(_get_llmobs_data_metastruct(spans[i]), ...)`. Conftest: replaces the `test_spans` override / `mock_llmobs_writer` plumbing with a `llama_index_llmobs(tracer, monkeypatch)` fixture that sets `_DD_LLMOBS_TEST_KEEP_META_STRUCT=1`, enables LLMObs against the test tracer, and mocks the span writer. Stacked on #17789. Co-authored-by: yun.kim <yun.kim@datadoghq.com>
Migrates llama_index LLMObs tests from inspecting projected wire
LLMObsSpanEvents (viamock_llmobs_writer.enqueue.*/llmobs_events) to reading the canonicalLLMObsSpanDatadirectly offspan.meta_struct["_llmobs"]and asserting viaassert_llmobs_span_data(_get_llmobs_data_metastruct(spans[i]), ...).Conftest: replaces the
test_spansoverride /mock_llmobs_writerplumbing with allama_index_llmobs(tracer, monkeypatch)fixture that sets_DD_LLMOBS_TEST_KEEP_META_STRUCT=1, enables LLMObs against the test tracer, and mocks the span writer.Stacked on #17789.