langwatch 0.2.4__py3-none-any.whl → 0.2.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
langwatch/__version__.py
CHANGED
langwatch/telemetry/tracing.py
CHANGED
|
@@ -102,7 +102,7 @@ class LangWatchTrace:
|
|
|
102
102
|
)
|
|
103
103
|
set_api_key(api_key=api_key)
|
|
104
104
|
|
|
105
|
-
self.metadata = metadata
|
|
105
|
+
self.metadata = metadata or {}
|
|
106
106
|
self.api_key = api_key
|
|
107
107
|
self.max_string_length = max_string_length
|
|
108
108
|
self._context_token = None
|
|
@@ -112,8 +112,6 @@ class LangWatchTrace:
|
|
|
112
112
|
Type[LangWatchSpan], lambda **kwargs: LangWatchSpan(trace=self, **kwargs)
|
|
113
113
|
)
|
|
114
114
|
|
|
115
|
-
if self.metadata is None:
|
|
116
|
-
self.metadata = {}
|
|
117
115
|
if trace_id is not None:
|
|
118
116
|
warn(
|
|
119
117
|
"trace_id is deprecated and will be removed in a future version. Future versions of the SDK will not support it. Until that happens, the `trace_id` will be mapped to `deprecated.trace_id` in the trace's metadata."
|
|
@@ -151,6 +149,11 @@ class LangWatchTrace:
|
|
|
151
149
|
"params": params,
|
|
152
150
|
"metrics": metrics,
|
|
153
151
|
"evaluations": evaluations,
|
|
152
|
+
"attributes": {
|
|
153
|
+
"metadata": json.dumps(
|
|
154
|
+
metadata, cls=SerializableWithStringFallback
|
|
155
|
+
),
|
|
156
|
+
},
|
|
154
157
|
}
|
|
155
158
|
if not skip_root_span
|
|
156
159
|
else None
|
|
@@ -322,10 +325,12 @@ class LangWatchTrace:
|
|
|
322
325
|
|
|
323
326
|
client = get_instance()
|
|
324
327
|
|
|
325
|
-
|
|
326
|
-
metadata
|
|
328
|
+
self.metadata = {
|
|
329
|
+
**(self.metadata or {}),
|
|
330
|
+
**(metadata or {}),
|
|
331
|
+
}
|
|
327
332
|
if trace_id is not None:
|
|
328
|
-
metadata[AttributeKey.DeprecatedTraceId] = str(trace_id)
|
|
333
|
+
self.metadata[AttributeKey.DeprecatedTraceId] = str(trace_id)
|
|
329
334
|
if expected_output is not None:
|
|
330
335
|
self._expected_output = expected_output
|
|
331
336
|
if disable_sending is not None and client is not None:
|
|
@@ -336,7 +341,7 @@ class LangWatchTrace:
|
|
|
336
341
|
self.root_span.set_attributes(
|
|
337
342
|
{
|
|
338
343
|
"metadata": json.dumps(
|
|
339
|
-
metadata, cls=SerializableWithStringFallback
|
|
344
|
+
self.metadata, cls=SerializableWithStringFallback
|
|
340
345
|
),
|
|
341
346
|
}
|
|
342
347
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
langwatch/__init__.py,sha256=nepKSqGG6MQnLgn3QrzcAQ24wlXc-wBAcS0Ks7oVUKk,3681
|
|
2
|
-
langwatch/__version__.py,sha256=
|
|
2
|
+
langwatch/__version__.py,sha256=Uc4pAfCERVGurCbsqa0LVcGk65JpeGgLT4Fvdxhb7jg,64
|
|
3
3
|
langwatch/attributes.py,sha256=VsNstyDPaMIjsM4U7yAIDE7ouVxgwhOdbQlrhce9XU8,3699
|
|
4
4
|
langwatch/batch_evaluation.py,sha256=cZ_OxDEpZhwVQap8fub3vcdWVYw9OdUCg7WTuy5FgoY,15748
|
|
5
5
|
langwatch/client.py,sha256=w-WkYRwgFMlfljAwcR6GBT11kBQOc3Ifb3hGY1htOd4,13156
|
|
@@ -207,7 +207,7 @@ langwatch/prompt/prompt.py,sha256=ujcyL_7d0fCLXT-UbFcdnH90D6tkSD5Ro5JGFncU9fQ,19
|
|
|
207
207
|
langwatch/telemetry/context.py,sha256=ixKvTBZADFuWglFCK95r8bF4-f-iq_WixzC4ydirCE8,3888
|
|
208
208
|
langwatch/telemetry/sampling.py,sha256=XDf6ZoXiwpHaHDYd_dDszSqH8_9-CHFNsGAZWOW1VYk,1327
|
|
209
209
|
langwatch/telemetry/span.py,sha256=HKYouwWWHCsc1PtnrB3UFFB-X1LT7DA5cSy-iA5Qoug,32779
|
|
210
|
-
langwatch/telemetry/tracing.py,sha256=
|
|
210
|
+
langwatch/telemetry/tracing.py,sha256=pAYwpNzhqDrv2meWCtKgaNi4em2dKIAaGbsdvsZlvGg,26550
|
|
211
211
|
langwatch/telemetry/types.py,sha256=Q9H7nT3GMK1aluRB7CCX8BR7VFKrQY_vdFdyF4Yc98U,501
|
|
212
212
|
langwatch/utils/__init__.py,sha256=3rqQTgzEtmICJW_KSPuLa5q8p5udxt5SRi28Z2vZB10,138
|
|
213
213
|
langwatch/utils/capture.py,sha256=uVKPqHCm-o8CpabsUfhqbNFr5sgUHzcKnBadvL2oIwI,1172
|
|
@@ -216,6 +216,6 @@ langwatch/utils/initialization.py,sha256=LOmGCiox7JRiHprnB04AdO8BhUggZtRbWgBPF9m
|
|
|
216
216
|
langwatch/utils/module.py,sha256=KLBNOK3mA9gCSifCcQX_lOtU48BJQDWvFKtF6NMvwVA,688
|
|
217
217
|
langwatch/utils/transformation.py,sha256=5XUnW7Oz8Ck9EMsKeKeoDOrIw3EXpLGMk_fMSeA0Zng,7216
|
|
218
218
|
langwatch/utils/utils.py,sha256=ZCOSie4o9LdJ7odshNfCNjmgwgQ27ojc5ENqt1rXuSs,596
|
|
219
|
-
langwatch-0.2.
|
|
220
|
-
langwatch-0.2.
|
|
221
|
-
langwatch-0.2.
|
|
219
|
+
langwatch-0.2.6.dist-info/METADATA,sha256=DhwwX5ybykNMTw7NCEpJTWZSNOfH2Cb0fCLXjPo0tbk,12886
|
|
220
|
+
langwatch-0.2.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
221
|
+
langwatch-0.2.6.dist-info/RECORD,,
|
|
File without changes
|