Skip to content

Commit 1d49072

Browse files
authored
chore(llmobs): missed updates in span kind key changes (#14718)
## Description Fixes a broken test blocking CI. Additionally, one of telemetry tags was incorrect. doing a grep for `span.kind` now in `ddtrace/llmobs` and `tests/llmobs` only reveals one instance, in defining our span context item key, which is fine. ## Testing Fixes the test blocking CI ## Risks None
1 parent d7e6134 commit 1d49072

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ddtrace/llmobs/_telemetry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _find_tag_value_from_tags(tags, tag_key):
4444

4545

4646
def _get_tags_from_span_event(event: LLMObsSpanEvent):
47-
span_kind = event.get("meta", {}).get("span.kind", "")
47+
span_kind = event.get("meta", {}).get("span", {}).get("kind", "")
4848
integration = _find_tag_value_from_tags(event.get("tags", []), "integration")
4949
ml_app = _find_tag_value_from_tags(event.get("tags", []), "ml_app")
5050
autoinstrumented = integration is not None

tests/llmobs/test_llmobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,5 +678,5 @@ def test_apm_traces_dropped_when_disabled(llmobs, llmobs_events, tracer, llmobs_
678678
# But LLMObs events should still be sent
679679
assert len(llmobs_events) == 1
680680
llm_event = llmobs_events[0]
681-
assert llm_event["meta"]["span.kind"] == "llm"
681+
assert llm_event["meta"]["span"]["kind"] == "llm"
682682
assert llm_event["meta"]["model_name"] == "test-model"

0 commit comments

Comments
 (0)