Skip to content

Commit f43969a

Browse files
committed
span_type -> span_kind
1 parent a5e7beb commit f43969a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/judgeval/tracer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def observe(
274274

275275
name = func.__qualname__
276276
attributes = {
277-
AttributeKeys.SPAN_TYPE: span_type,
277+
AttributeKeys.JUDGMENT_SPAN_KIND: span_type,
278278
}
279279

280280
if inspect.iscoroutinefunction(func):

src/judgeval/tracer/keys.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88

99

1010
class AttributeKeys:
11-
SPAN_TYPE = SpanAttributes.TYPE
12-
1311
# General function tracing attributes (custom namespace)
12+
JUDGMENT_SPAN_KIND = "judgment.span_kind"
1413
JUDGMENT_INPUT = "judgment.input"
1514
JUDGMENT_OUTPUT = "judgment.output"
1615

src/judgeval/tracer/llm/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def wrapped(function):
5353
@functools.wraps(function)
5454
def wrapper(*args, **kwargs):
5555
with sync_span_context(
56-
tracer, span_name, {AttributeKeys.SPAN_TYPE: "llm"}
56+
tracer, span_name, {AttributeKeys.JUDGMENT_SPAN_KIND: "llm"}
5757
) as span:
5858
span.set_attribute(AttributeKeys.GEN_AI_PROMPT, safe_serialize(kwargs))
5959
try:
@@ -87,7 +87,7 @@ def wrapped_async(function):
8787
@functools.wraps(function)
8888
async def wrapper(*args, **kwargs):
8989
async with async_span_context(
90-
tracer, span_name, {AttributeKeys.SPAN_TYPE: "llm"}
90+
tracer, span_name, {AttributeKeys.JUDGMENT_SPAN_KIND: "llm"}
9191
) as span:
9292
span.set_attribute(AttributeKeys.GEN_AI_PROMPT, safe_serialize(kwargs))
9393
try:

0 commit comments

Comments
 (0)