langwatch 0.3.2 → 0.4.0

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.
Files changed (202) hide show
  1. package/dist/{add-LBBS4I3H.js → add-35QACTIV.js} +34 -28
  2. package/dist/add-35QACTIV.js.map +1 -0
  3. package/dist/{add-RD3ZKFAT.mjs → add-TRJAXM4D.mjs} +22 -16
  4. package/dist/add-TRJAXM4D.mjs.map +1 -0
  5. package/dist/chunk-4ZSSHX6F.js +636 -0
  6. package/dist/chunk-4ZSSHX6F.js.map +1 -0
  7. package/dist/chunk-5EVBOHJY.js +155 -0
  8. package/dist/chunk-5EVBOHJY.js.map +1 -0
  9. package/dist/{chunk-YN4436PK.mjs → chunk-CU3443HD.mjs} +14 -9
  10. package/dist/{chunk-2JU376G7.js → chunk-D2CSG4SJ.js} +4 -4
  11. package/dist/chunk-D2CSG4SJ.js.map +1 -0
  12. package/dist/chunk-DISMHYXC.js +184 -0
  13. package/dist/chunk-DISMHYXC.js.map +1 -0
  14. package/dist/{chunk-E7UE2MPD.mjs → chunk-ECUXLXFT.mjs} +2 -2
  15. package/dist/chunk-EJWJXTPU.mjs +626 -0
  16. package/dist/chunk-EJWJXTPU.mjs.map +1 -0
  17. package/dist/chunk-GQMDZ4GY.mjs +155 -0
  18. package/dist/chunk-GQMDZ4GY.mjs.map +1 -0
  19. package/dist/{chunk-3GKPQB4R.mjs → chunk-HUI45ULC.mjs} +4 -4
  20. package/dist/chunk-HUI45ULC.mjs.map +1 -0
  21. package/dist/{chunk-HJU67C7H.js → chunk-K64Y6YUG.js} +10 -10
  22. package/dist/{chunk-HJU67C7H.js.map → chunk-K64Y6YUG.js.map} +1 -1
  23. package/dist/chunk-LP76VXI3.mjs +636 -0
  24. package/dist/chunk-LP76VXI3.mjs.map +1 -0
  25. package/dist/chunk-M4VUHTT2.js +626 -0
  26. package/dist/chunk-M4VUHTT2.js.map +1 -0
  27. package/dist/{chunk-PR3JDWC3.mjs → chunk-N2V6J3U2.mjs} +28 -3
  28. package/dist/chunk-N2V6J3U2.mjs.map +1 -0
  29. package/dist/chunk-OUCVXP4G.js +258 -0
  30. package/dist/chunk-OUCVXP4G.js.map +1 -0
  31. package/dist/{chunk-FJLK5CFL.js → chunk-OXBO24RB.js} +13 -8
  32. package/dist/chunk-OXBO24RB.js.map +1 -0
  33. package/dist/chunk-PGWR3OQY.mjs +258 -0
  34. package/dist/chunk-PGWR3OQY.mjs.map +1 -0
  35. package/dist/{chunk-SMXXAVMB.js → chunk-SGNJDRCT.js} +2 -2
  36. package/dist/chunk-SGNJDRCT.js.map +1 -0
  37. package/dist/{chunk-W5ZEP3CI.mjs → chunk-SYMZPWZE.mjs} +2 -2
  38. package/dist/chunk-SYMZPWZE.mjs.map +1 -0
  39. package/dist/{chunk-KGDAENGD.js → chunk-YH5TIVK2.js} +28 -3
  40. package/dist/chunk-YH5TIVK2.js.map +1 -0
  41. package/dist/chunk-YNQ44U6D.mjs +184 -0
  42. package/dist/chunk-YNQ44U6D.mjs.map +1 -0
  43. package/dist/cli/index.js +8 -8
  44. package/dist/cli/index.mjs +8 -8
  45. package/dist/{create-G5MTGOOH.js → create-7K2CC4KQ.js} +11 -11
  46. package/dist/{create-G5MTGOOH.js.map → create-7K2CC4KQ.js.map} +1 -1
  47. package/dist/{create-QUZYBMQB.mjs → create-MK7NEGCM.mjs} +8 -8
  48. package/dist/implementation-C4lvooSg.d.mts +576 -0
  49. package/dist/implementation-CzemP9jY.d.ts +576 -0
  50. package/dist/index-DTEZr0Jn.d.mts +34 -0
  51. package/dist/index-DTEZr0Jn.d.ts +34 -0
  52. package/dist/index.d.mts +121 -47
  53. package/dist/index.d.ts +121 -47
  54. package/dist/index.js +16 -12
  55. package/dist/index.js.map +1 -1
  56. package/dist/index.mjs +27 -23
  57. package/dist/index.mjs.map +1 -1
  58. package/dist/init-GDKJICSS.js +16 -0
  59. package/dist/{init-XU2JFY6N.js.map → init-GDKJICSS.js.map} +1 -1
  60. package/dist/{init-H67RW22E.mjs → init-RINSTP4L.mjs} +5 -5
  61. package/dist/{list-7NPSX2E4.mjs → list-7L23G5DY.mjs} +28 -16
  62. package/dist/list-7L23G5DY.mjs.map +1 -0
  63. package/dist/{list-ZXFLAF52.js → list-OLLQ7XKZ.js} +29 -17
  64. package/dist/list-OLLQ7XKZ.js.map +1 -0
  65. package/dist/{login-EK4WVOI2.mjs → login-RCNKL5AM.mjs} +6 -5
  66. package/dist/login-RCNKL5AM.mjs.map +1 -0
  67. package/dist/{login-76NQIHKR.js → login-XF3BQQPV.js} +7 -6
  68. package/dist/login-XF3BQQPV.js.map +1 -0
  69. package/dist/observability-sdk/index.d.mts +134 -0
  70. package/dist/observability-sdk/index.d.ts +134 -0
  71. package/dist/observability-sdk/index.js +41 -0
  72. package/dist/observability-sdk/index.js.map +1 -0
  73. package/dist/observability-sdk/index.mjs +41 -0
  74. package/dist/observability-sdk/instrumentation/langchain/index.d.mts +69 -0
  75. package/dist/observability-sdk/instrumentation/langchain/index.d.ts +69 -0
  76. package/dist/observability-sdk/instrumentation/langchain/index.js +518 -0
  77. package/dist/observability-sdk/instrumentation/langchain/index.js.map +1 -0
  78. package/dist/observability-sdk/instrumentation/langchain/index.mjs +518 -0
  79. package/dist/observability-sdk/instrumentation/langchain/index.mjs.map +1 -0
  80. package/dist/observability-sdk/setup/node/index.d.mts +368 -0
  81. package/dist/observability-sdk/setup/node/index.d.ts +368 -0
  82. package/dist/observability-sdk/setup/node/index.js +276 -0
  83. package/dist/observability-sdk/setup/node/index.js.map +1 -0
  84. package/dist/observability-sdk/setup/node/index.mjs +276 -0
  85. package/dist/observability-sdk/setup/node/index.mjs.map +1 -0
  86. package/dist/{remove-SDJYEPAY.mjs → remove-3VLQNVHN.mjs} +11 -8
  87. package/dist/remove-3VLQNVHN.mjs.map +1 -0
  88. package/dist/{remove-XBNGIVMR.js → remove-L6JVJBWY.js} +18 -15
  89. package/dist/remove-L6JVJBWY.js.map +1 -0
  90. package/dist/{sync-ST2IWXSB.mjs → sync-DPMTUTVL.mjs} +39 -33
  91. package/dist/sync-DPMTUTVL.mjs.map +1 -0
  92. package/dist/{sync-EISKGPTL.js → sync-PSU3F5Z4.js} +52 -46
  93. package/dist/sync-PSU3F5Z4.js.map +1 -0
  94. package/dist/{prompt-D-jpMrLS.d.mts → types-1q5wIYP5.d.mts} +628 -14
  95. package/dist/{prompt-D-jpMrLS.d.ts → types-C9k5gGhU.d.ts} +628 -14
  96. package/dist/types-DRiQaKFG.d.mts +254 -0
  97. package/dist/types-DRiQaKFG.d.ts +254 -0
  98. package/dist/types-Dmazk5Bk.d.mts +44 -0
  99. package/dist/types-Dmazk5Bk.d.ts +44 -0
  100. package/package.json +39 -39
  101. package/dist/add-LBBS4I3H.js.map +0 -1
  102. package/dist/add-RD3ZKFAT.mjs.map +0 -1
  103. package/dist/chunk-2JU376G7.js.map +0 -1
  104. package/dist/chunk-2ODBGSBI.js +0 -4
  105. package/dist/chunk-2ODBGSBI.js.map +0 -1
  106. package/dist/chunk-3GKPQB4R.mjs.map +0 -1
  107. package/dist/chunk-52GXX3MA.js +0 -426
  108. package/dist/chunk-52GXX3MA.js.map +0 -1
  109. package/dist/chunk-5NC5ILKA.js +0 -94
  110. package/dist/chunk-5NC5ILKA.js.map +0 -1
  111. package/dist/chunk-AAROJADR.mjs +0 -49
  112. package/dist/chunk-AAROJADR.mjs.map +0 -1
  113. package/dist/chunk-DTEKFQ4U.js +0 -159
  114. package/dist/chunk-DTEKFQ4U.js.map +0 -1
  115. package/dist/chunk-F63YKTXA.mjs +0 -47
  116. package/dist/chunk-F63YKTXA.mjs.map +0 -1
  117. package/dist/chunk-FJLK5CFL.js.map +0 -1
  118. package/dist/chunk-GJSEBQXF.mjs +0 -392
  119. package/dist/chunk-GJSEBQXF.mjs.map +0 -1
  120. package/dist/chunk-IGHXIIIK.js +0 -49
  121. package/dist/chunk-IGHXIIIK.js.map +0 -1
  122. package/dist/chunk-J7ICRUU4.mjs +0 -426
  123. package/dist/chunk-J7ICRUU4.mjs.map +0 -1
  124. package/dist/chunk-KGDAENGD.js.map +0 -1
  125. package/dist/chunk-LD74LVRU.js +0 -47
  126. package/dist/chunk-LD74LVRU.js.map +0 -1
  127. package/dist/chunk-PCQVQ7SB.js +0 -45
  128. package/dist/chunk-PCQVQ7SB.js.map +0 -1
  129. package/dist/chunk-PR3JDWC3.mjs.map +0 -1
  130. package/dist/chunk-PWZBLTHR.js +0 -118
  131. package/dist/chunk-PWZBLTHR.js.map +0 -1
  132. package/dist/chunk-QEWDG5QE.mjs +0 -45
  133. package/dist/chunk-QEWDG5QE.mjs.map +0 -1
  134. package/dist/chunk-SMXXAVMB.js.map +0 -1
  135. package/dist/chunk-STV4ZVNA.mjs +0 -118
  136. package/dist/chunk-STV4ZVNA.mjs.map +0 -1
  137. package/dist/chunk-T5AZMMVS.mjs +0 -94
  138. package/dist/chunk-T5AZMMVS.mjs.map +0 -1
  139. package/dist/chunk-UU33HCCZ.mjs +0 -159
  140. package/dist/chunk-UU33HCCZ.mjs.map +0 -1
  141. package/dist/chunk-VGHLQXKB.js +0 -392
  142. package/dist/chunk-VGHLQXKB.js.map +0 -1
  143. package/dist/chunk-W5ZEP3CI.mjs.map +0 -1
  144. package/dist/chunk-Y666BJA5.mjs +0 -4
  145. package/dist/chunk-YN4436PK.mjs.map +0 -1
  146. package/dist/client-B2HqIKg6.d.ts +0 -51
  147. package/dist/client-XyCqclCi.d.mts +0 -51
  148. package/dist/client-browser.d.mts +0 -8
  149. package/dist/client-browser.d.ts +0 -8
  150. package/dist/client-browser.js +0 -88
  151. package/dist/client-browser.js.map +0 -1
  152. package/dist/client-browser.mjs +0 -88
  153. package/dist/client-browser.mjs.map +0 -1
  154. package/dist/client-node.d.mts +0 -8
  155. package/dist/client-node.d.ts +0 -8
  156. package/dist/client-node.js +0 -95
  157. package/dist/client-node.js.map +0 -1
  158. package/dist/client-node.mjs +0 -95
  159. package/dist/client-node.mjs.map +0 -1
  160. package/dist/evaluation/index.d.mts +0 -897
  161. package/dist/evaluation/index.d.ts +0 -897
  162. package/dist/evaluation/index.js +0 -14
  163. package/dist/evaluation/index.js.map +0 -1
  164. package/dist/evaluation/index.mjs +0 -14
  165. package/dist/filterable-batch-span-processor-zO5kcjBY.d.mts +0 -64
  166. package/dist/filterable-batch-span-processor-zO5kcjBY.d.ts +0 -64
  167. package/dist/init-XU2JFY6N.js +0 -16
  168. package/dist/list-7NPSX2E4.mjs.map +0 -1
  169. package/dist/list-ZXFLAF52.js.map +0 -1
  170. package/dist/login-76NQIHKR.js.map +0 -1
  171. package/dist/login-EK4WVOI2.mjs.map +0 -1
  172. package/dist/observability/index.d.mts +0 -260
  173. package/dist/observability/index.d.ts +0 -260
  174. package/dist/observability/index.js +0 -21
  175. package/dist/observability/index.js.map +0 -1
  176. package/dist/observability/index.mjs +0 -21
  177. package/dist/observability/index.mjs.map +0 -1
  178. package/dist/observability/instrumentation/langchain/index.d.mts +0 -40
  179. package/dist/observability/instrumentation/langchain/index.d.ts +0 -40
  180. package/dist/observability/instrumentation/langchain/index.js +0 -668
  181. package/dist/observability/instrumentation/langchain/index.js.map +0 -1
  182. package/dist/observability/instrumentation/langchain/index.mjs +0 -668
  183. package/dist/observability/instrumentation/langchain/index.mjs.map +0 -1
  184. package/dist/prompt/index.d.mts +0 -10
  185. package/dist/prompt/index.d.ts +0 -10
  186. package/dist/prompt/index.js +0 -22
  187. package/dist/prompt/index.js.map +0 -1
  188. package/dist/prompt/index.mjs +0 -22
  189. package/dist/prompt/index.mjs.map +0 -1
  190. package/dist/record-evaluation-CmxMXa-3.d.mts +0 -25
  191. package/dist/record-evaluation-CmxMXa-3.d.ts +0 -25
  192. package/dist/remove-SDJYEPAY.mjs.map +0 -1
  193. package/dist/remove-XBNGIVMR.js.map +0 -1
  194. package/dist/sync-EISKGPTL.js.map +0 -1
  195. package/dist/sync-ST2IWXSB.mjs.map +0 -1
  196. package/dist/trace-CqaKo0kZ.d.ts +0 -622
  197. package/dist/trace-DtVc5GhF.d.mts +0 -622
  198. /package/dist/{chunk-Y666BJA5.mjs.map → chunk-CU3443HD.mjs.map} +0 -0
  199. /package/dist/{chunk-E7UE2MPD.mjs.map → chunk-ECUXLXFT.mjs.map} +0 -0
  200. /package/dist/{create-QUZYBMQB.mjs.map → create-MK7NEGCM.mjs.map} +0 -0
  201. /package/dist/{init-H67RW22E.mjs.map → init-RINSTP4L.mjs.map} +0 -0
  202. /package/dist/{evaluation → observability-sdk}/index.mjs.map +0 -0
@@ -0,0 +1,254 @@
1
+ import { AttributeValue } from '@opentelemetry/api';
2
+ import { AnyValue } from '@opentelemetry/api-logs';
3
+ import * as semconvAttributes from '@opentelemetry/semantic-conventions';
4
+ import * as semconvIncubatingAttributes from '@opentelemetry/semantic-conventions/incubating';
5
+
6
+ /**
7
+ * LangWatch input data attribute key
8
+ * Used to store the input data for a span or event
9
+ */
10
+ declare const ATTR_LANGWATCH_INPUT = "langwatch.input";
11
+ /**
12
+ * LangWatch output data attribute key
13
+ * Used to store the output data for a span or event
14
+ */
15
+ declare const ATTR_LANGWATCH_OUTPUT = "langwatch.output";
16
+ /**
17
+ * LangWatch span type attribute key
18
+ * Used to identify the type of span being traced
19
+ */
20
+ declare const ATTR_LANGWATCH_SPAN_TYPE = "langwatch.span.type";
21
+ /**
22
+ * LangWatch RAG contexts attribute key
23
+ * Used to store retrieval-augmented generation contexts
24
+ */
25
+ declare const ATTR_LANGWATCH_RAG_CONTEXTS = "langwatch.contexts";
26
+ /**
27
+ * LangWatch metrics attribute key
28
+ * Used to store custom metrics data
29
+ */
30
+ declare const ATTR_LANGWATCH_METRICS = "langwatch.metrics";
31
+ /**
32
+ * LangWatch SDK version attribute key
33
+ * Used to track the version of the LangWatch SDK being used
34
+ */
35
+ declare const ATTR_LANGWATCH_SDK_VERSION = "langwatch.sdk.version";
36
+ /**
37
+ * LangWatch SDK name attribute key
38
+ * Used to identify the LangWatch SDK implementation
39
+ */
40
+ declare const ATTR_LANGWATCH_SDK_NAME = "langwatch.sdk.name";
41
+ /**
42
+ * LangWatch SDK language attribute key
43
+ * Used to identify the programming language of the SDK
44
+ */
45
+ declare const ATTR_LANGWATCH_SDK_LANGUAGE = "langwatch.sdk.language";
46
+ /**
47
+ * LangWatch timestamps attribute key
48
+ * Used to store timing information for events
49
+ */
50
+ declare const ATTR_LANGWATCH_TIMESTAMPS = "langwatch.timestamps";
51
+ /**
52
+ * LangWatch custom evaluation attribute key
53
+ * Used to store custom evaluation data
54
+ */
55
+ declare const ATTR_LANGWATCH_EVALUATION_CUSTOM = "langwatch.evaluation.custom";
56
+ /**
57
+ * LangWatch parameters attribute key
58
+ * Used to store parameter data for operations
59
+ */
60
+ declare const ATTR_LANGWATCH_PARAMS = "langwatch.params";
61
+ /**
62
+ * LangWatch customer ID attribute key
63
+ * Used to identify the customer associated with the trace
64
+ */
65
+ declare const ATTR_LANGWATCH_CUSTOMER_ID = "langwatch.customer.id";
66
+ /**
67
+ * LangWatch thread ID attribute key
68
+ * Used to group related operations within a conversation thread
69
+ */
70
+ declare const ATTR_LANGWATCH_THREAD_ID = "langwatch.thread.id";
71
+ /**
72
+ * LangWatch user ID attribute key
73
+ * Used to store the user ID for a span or event
74
+ */
75
+ declare const ATTR_LANGWATCH_USER_ID = "langwatch.user.id";
76
+ /**
77
+ * LangWatch tags attribute key
78
+ * Used to store tags for a span or event
79
+ */
80
+ declare const ATTR_LANGWATCH_TAGS = "langwatch.tags";
81
+ /**
82
+ * LangWatch streaming attribute key
83
+ * Used to indicate if the operation involves streaming
84
+ */
85
+ declare const ATTR_LANGWATCH_STREAMING = "langwatch.gen_ai.streaming";
86
+ /**
87
+ * LangWatch prompt ID attribute key
88
+ * Used to identify the specific prompt being used
89
+ */
90
+ declare const ATTR_LANGWATCH_PROMPT_ID = "langwatch.prompt.id";
91
+ /**
92
+ * LangWatch prompt ID attribute key
93
+ * Used to identify the specific prompt being used
94
+ */
95
+ declare const ATTR_LANGWATCH_PROMPT_HANDLE = "langwatch.prompt.handle";
96
+ /**
97
+ * LangWatch prompt version ID attribute key
98
+ * Used to identify the specific version of a prompt
99
+ */
100
+ declare const ATTR_LANGWATCH_PROMPT_VERSION_ID = "langwatch.prompt.version.id";
101
+ /**
102
+ * LangWatch prompt variables attribute key
103
+ * Used to store variables used in prompt templates
104
+ */
105
+ declare const ATTR_LANGWATCH_PROMPT_VARIABLES = "langwatch.prompt.variables";
106
+ /**
107
+ * LangWatch prompt selected ID attribute key
108
+ * Used to identify which prompt was selected from a set
109
+ */
110
+ declare const ATTR_LANGWATCH_PROMPT_SELECTED_ID = "langwatch.prompt.selected.id";
111
+ /**
112
+ * LangWatch prompt version number attribute key
113
+ * Used to track the version number of a prompt
114
+ */
115
+ declare const ATTR_LANGWATCH_PROMPT_VERSION_NUMBER = "langwatch.prompt.version.number";
116
+ /**
117
+ * LangWatch LangChain tags attribute key
118
+ * Used to store tags associated with LangChain operations
119
+ */
120
+ declare const ATTR_LANGWATCH_LANGCHAIN_TAGS = "langwatch.langchain.tags";
121
+ /**
122
+ * LangWatch LangChain event name attribute key
123
+ * Used to identify the specific LangChain event type
124
+ */
125
+ declare const ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME = "langwatch.langchain.event_name";
126
+ /**
127
+ * LangWatch LangChain run ID attribute key
128
+ * Used to identify a specific LangChain run
129
+ */
130
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_ID = "langwatch.langchain.run.id";
131
+ /**
132
+ * LangWatch LangChain run tags attribute key
133
+ * Used to store tags associated with a LangChain run
134
+ */
135
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS = "langwatch.langchain.run.tags";
136
+ /**
137
+ * LangWatch LangChain run type attribute key
138
+ * Used to identify the type of LangChain run
139
+ */
140
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE = "langwatch.langchain.run.type";
141
+ /**
142
+ * LangWatch LangChain run metadata attribute key
143
+ * Used to store metadata associated with a LangChain run
144
+ */
145
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA = "langwatch.langchain.run.metadata";
146
+ /**
147
+ * LangWatch LangChain run extra parameters attribute key
148
+ * Used to store additional parameters for a LangChain run
149
+ */
150
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS = "langwatch.langchain.run.extra_params";
151
+ /**
152
+ * LangWatch LangChain run parent ID attribute key
153
+ * Used to identify the parent run in a hierarchical structure
154
+ */
155
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID = "langwatch.langchain.run.parent.id";
156
+
157
+ declare const langwatchAttributes_ATTR_LANGWATCH_CUSTOMER_ID: typeof ATTR_LANGWATCH_CUSTOMER_ID;
158
+ declare const langwatchAttributes_ATTR_LANGWATCH_EVALUATION_CUSTOM: typeof ATTR_LANGWATCH_EVALUATION_CUSTOM;
159
+ declare const langwatchAttributes_ATTR_LANGWATCH_INPUT: typeof ATTR_LANGWATCH_INPUT;
160
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME: typeof ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME;
161
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS;
162
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_ID: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_ID;
163
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA;
164
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID;
165
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS;
166
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE;
167
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_TAGS: typeof ATTR_LANGWATCH_LANGCHAIN_TAGS;
168
+ declare const langwatchAttributes_ATTR_LANGWATCH_METRICS: typeof ATTR_LANGWATCH_METRICS;
169
+ declare const langwatchAttributes_ATTR_LANGWATCH_OUTPUT: typeof ATTR_LANGWATCH_OUTPUT;
170
+ declare const langwatchAttributes_ATTR_LANGWATCH_PARAMS: typeof ATTR_LANGWATCH_PARAMS;
171
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_HANDLE: typeof ATTR_LANGWATCH_PROMPT_HANDLE;
172
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_ID: typeof ATTR_LANGWATCH_PROMPT_ID;
173
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_SELECTED_ID: typeof ATTR_LANGWATCH_PROMPT_SELECTED_ID;
174
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_VARIABLES: typeof ATTR_LANGWATCH_PROMPT_VARIABLES;
175
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_ID: typeof ATTR_LANGWATCH_PROMPT_VERSION_ID;
176
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_NUMBER: typeof ATTR_LANGWATCH_PROMPT_VERSION_NUMBER;
177
+ declare const langwatchAttributes_ATTR_LANGWATCH_RAG_CONTEXTS: typeof ATTR_LANGWATCH_RAG_CONTEXTS;
178
+ declare const langwatchAttributes_ATTR_LANGWATCH_SDK_LANGUAGE: typeof ATTR_LANGWATCH_SDK_LANGUAGE;
179
+ declare const langwatchAttributes_ATTR_LANGWATCH_SDK_NAME: typeof ATTR_LANGWATCH_SDK_NAME;
180
+ declare const langwatchAttributes_ATTR_LANGWATCH_SDK_VERSION: typeof ATTR_LANGWATCH_SDK_VERSION;
181
+ declare const langwatchAttributes_ATTR_LANGWATCH_SPAN_TYPE: typeof ATTR_LANGWATCH_SPAN_TYPE;
182
+ declare const langwatchAttributes_ATTR_LANGWATCH_STREAMING: typeof ATTR_LANGWATCH_STREAMING;
183
+ declare const langwatchAttributes_ATTR_LANGWATCH_TAGS: typeof ATTR_LANGWATCH_TAGS;
184
+ declare const langwatchAttributes_ATTR_LANGWATCH_THREAD_ID: typeof ATTR_LANGWATCH_THREAD_ID;
185
+ declare const langwatchAttributes_ATTR_LANGWATCH_TIMESTAMPS: typeof ATTR_LANGWATCH_TIMESTAMPS;
186
+ declare const langwatchAttributes_ATTR_LANGWATCH_USER_ID: typeof ATTR_LANGWATCH_USER_ID;
187
+ declare namespace langwatchAttributes {
188
+ export { langwatchAttributes_ATTR_LANGWATCH_CUSTOMER_ID as ATTR_LANGWATCH_CUSTOMER_ID, langwatchAttributes_ATTR_LANGWATCH_EVALUATION_CUSTOM as ATTR_LANGWATCH_EVALUATION_CUSTOM, langwatchAttributes_ATTR_LANGWATCH_INPUT as ATTR_LANGWATCH_INPUT, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME as ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS as ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_ID as ATTR_LANGWATCH_LANGCHAIN_RUN_ID, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA as ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID as ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS as ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE as ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_TAGS as ATTR_LANGWATCH_LANGCHAIN_TAGS, langwatchAttributes_ATTR_LANGWATCH_METRICS as ATTR_LANGWATCH_METRICS, langwatchAttributes_ATTR_LANGWATCH_OUTPUT as ATTR_LANGWATCH_OUTPUT, langwatchAttributes_ATTR_LANGWATCH_PARAMS as ATTR_LANGWATCH_PARAMS, langwatchAttributes_ATTR_LANGWATCH_PROMPT_HANDLE as ATTR_LANGWATCH_PROMPT_HANDLE, langwatchAttributes_ATTR_LANGWATCH_PROMPT_ID as ATTR_LANGWATCH_PROMPT_ID, langwatchAttributes_ATTR_LANGWATCH_PROMPT_SELECTED_ID as ATTR_LANGWATCH_PROMPT_SELECTED_ID, langwatchAttributes_ATTR_LANGWATCH_PROMPT_VARIABLES as ATTR_LANGWATCH_PROMPT_VARIABLES, langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_ID as ATTR_LANGWATCH_PROMPT_VERSION_ID, langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_NUMBER as ATTR_LANGWATCH_PROMPT_VERSION_NUMBER, langwatchAttributes_ATTR_LANGWATCH_RAG_CONTEXTS as ATTR_LANGWATCH_RAG_CONTEXTS, langwatchAttributes_ATTR_LANGWATCH_SDK_LANGUAGE as ATTR_LANGWATCH_SDK_LANGUAGE, langwatchAttributes_ATTR_LANGWATCH_SDK_NAME as ATTR_LANGWATCH_SDK_NAME, langwatchAttributes_ATTR_LANGWATCH_SDK_VERSION as ATTR_LANGWATCH_SDK_VERSION, langwatchAttributes_ATTR_LANGWATCH_SPAN_TYPE as ATTR_LANGWATCH_SPAN_TYPE, langwatchAttributes_ATTR_LANGWATCH_STREAMING as ATTR_LANGWATCH_STREAMING, langwatchAttributes_ATTR_LANGWATCH_TAGS as ATTR_LANGWATCH_TAGS, langwatchAttributes_ATTR_LANGWATCH_THREAD_ID as ATTR_LANGWATCH_THREAD_ID, langwatchAttributes_ATTR_LANGWATCH_TIMESTAMPS as ATTR_LANGWATCH_TIMESTAMPS, langwatchAttributes_ATTR_LANGWATCH_USER_ID as ATTR_LANGWATCH_USER_ID };
189
+ }
190
+
191
+ type OnlyStringValues<T> = {
192
+ [K in keyof T]: T[K] extends string ? T[K] : never;
193
+ }[keyof T];
194
+ /**
195
+ * Union type representing all possible attribute keys that can be used in spans.
196
+ *
197
+ * This includes:
198
+ * - Standard OpenTelemetry semantic convention attributes
199
+ * - LangWatch-specific attributes
200
+ * - Custom string attributes
201
+ *
202
+ * @example
203
+ * ```typescript
204
+ * const attributes: SemconvAttributes = {
205
+ * "http.method": "GET",
206
+ * "http.url": "https://api.example.com",
207
+ * "langwatch.span.type": "llm",
208
+ * "custom.attribute": "value"
209
+ * };
210
+ * ```
211
+ */
212
+ type SemConvAttributeKey = OnlyStringValues<typeof semconvIncubatingAttributes> | OnlyStringValues<typeof semconvAttributes> | OnlyStringValues<typeof langwatchAttributes> | (string & {});
213
+ /**
214
+ * Record type representing span attributes with semantic convention keys.
215
+ *
216
+ * This type ensures type safety when setting attributes on spans while
217
+ * allowing both standard OpenTelemetry semantic conventions and custom attributes.
218
+ *
219
+ * @example
220
+ * ```typescript
221
+ * const spanAttributes: SemConvAttributes = {
222
+ * "service.name": "my-service",
223
+ * "service.version": "1.0.0",
224
+ * "langwatch.span.type": "llm",
225
+ * "custom.user.id": "user123"
226
+ * };
227
+ * ```
228
+ */
229
+ type SemConvAttributes = Partial<Record<SemConvAttributeKey, AttributeValue>>;
230
+ /**
231
+ * Record type representing log record attributes with semantic convention keys.
232
+ *
233
+ * This type ensures type safety when setting attributes on log records while
234
+ * allowing both standard OpenTelemetry semantic conventions and custom attributes.
235
+ *
236
+ * @example
237
+ * ```typescript
238
+ * const logRecordAttributes: SemConvLogRecordAttributes = {
239
+ * "log.level": "INFO",
240
+ * "log.source": "my-service",
241
+ * "log.category": "test",
242
+ * "user.id": "12345",
243
+ * "string.attr": "string value",
244
+ * "number.attr": 42,
245
+ * "boolean.attr": true,
246
+ * "array.attr": ["item1", "item2", "item3"],
247
+ * "object.attr": { key1: "value1", key2: "value2" },
248
+ * "null.attr": null,
249
+ * };
250
+ * ```
251
+ */
252
+ type SemConvLogRecordAttributes = Partial<Record<SemConvAttributeKey, AnyValue>>;
253
+
254
+ export { type SemConvAttributes as S, type SemConvLogRecordAttributes as a, type SemConvAttributeKey as b, langwatchAttributes as l };
@@ -0,0 +1,254 @@
1
+ import { AttributeValue } from '@opentelemetry/api';
2
+ import { AnyValue } from '@opentelemetry/api-logs';
3
+ import * as semconvAttributes from '@opentelemetry/semantic-conventions';
4
+ import * as semconvIncubatingAttributes from '@opentelemetry/semantic-conventions/incubating';
5
+
6
+ /**
7
+ * LangWatch input data attribute key
8
+ * Used to store the input data for a span or event
9
+ */
10
+ declare const ATTR_LANGWATCH_INPUT = "langwatch.input";
11
+ /**
12
+ * LangWatch output data attribute key
13
+ * Used to store the output data for a span or event
14
+ */
15
+ declare const ATTR_LANGWATCH_OUTPUT = "langwatch.output";
16
+ /**
17
+ * LangWatch span type attribute key
18
+ * Used to identify the type of span being traced
19
+ */
20
+ declare const ATTR_LANGWATCH_SPAN_TYPE = "langwatch.span.type";
21
+ /**
22
+ * LangWatch RAG contexts attribute key
23
+ * Used to store retrieval-augmented generation contexts
24
+ */
25
+ declare const ATTR_LANGWATCH_RAG_CONTEXTS = "langwatch.contexts";
26
+ /**
27
+ * LangWatch metrics attribute key
28
+ * Used to store custom metrics data
29
+ */
30
+ declare const ATTR_LANGWATCH_METRICS = "langwatch.metrics";
31
+ /**
32
+ * LangWatch SDK version attribute key
33
+ * Used to track the version of the LangWatch SDK being used
34
+ */
35
+ declare const ATTR_LANGWATCH_SDK_VERSION = "langwatch.sdk.version";
36
+ /**
37
+ * LangWatch SDK name attribute key
38
+ * Used to identify the LangWatch SDK implementation
39
+ */
40
+ declare const ATTR_LANGWATCH_SDK_NAME = "langwatch.sdk.name";
41
+ /**
42
+ * LangWatch SDK language attribute key
43
+ * Used to identify the programming language of the SDK
44
+ */
45
+ declare const ATTR_LANGWATCH_SDK_LANGUAGE = "langwatch.sdk.language";
46
+ /**
47
+ * LangWatch timestamps attribute key
48
+ * Used to store timing information for events
49
+ */
50
+ declare const ATTR_LANGWATCH_TIMESTAMPS = "langwatch.timestamps";
51
+ /**
52
+ * LangWatch custom evaluation attribute key
53
+ * Used to store custom evaluation data
54
+ */
55
+ declare const ATTR_LANGWATCH_EVALUATION_CUSTOM = "langwatch.evaluation.custom";
56
+ /**
57
+ * LangWatch parameters attribute key
58
+ * Used to store parameter data for operations
59
+ */
60
+ declare const ATTR_LANGWATCH_PARAMS = "langwatch.params";
61
+ /**
62
+ * LangWatch customer ID attribute key
63
+ * Used to identify the customer associated with the trace
64
+ */
65
+ declare const ATTR_LANGWATCH_CUSTOMER_ID = "langwatch.customer.id";
66
+ /**
67
+ * LangWatch thread ID attribute key
68
+ * Used to group related operations within a conversation thread
69
+ */
70
+ declare const ATTR_LANGWATCH_THREAD_ID = "langwatch.thread.id";
71
+ /**
72
+ * LangWatch user ID attribute key
73
+ * Used to store the user ID for a span or event
74
+ */
75
+ declare const ATTR_LANGWATCH_USER_ID = "langwatch.user.id";
76
+ /**
77
+ * LangWatch tags attribute key
78
+ * Used to store tags for a span or event
79
+ */
80
+ declare const ATTR_LANGWATCH_TAGS = "langwatch.tags";
81
+ /**
82
+ * LangWatch streaming attribute key
83
+ * Used to indicate if the operation involves streaming
84
+ */
85
+ declare const ATTR_LANGWATCH_STREAMING = "langwatch.gen_ai.streaming";
86
+ /**
87
+ * LangWatch prompt ID attribute key
88
+ * Used to identify the specific prompt being used
89
+ */
90
+ declare const ATTR_LANGWATCH_PROMPT_ID = "langwatch.prompt.id";
91
+ /**
92
+ * LangWatch prompt ID attribute key
93
+ * Used to identify the specific prompt being used
94
+ */
95
+ declare const ATTR_LANGWATCH_PROMPT_HANDLE = "langwatch.prompt.handle";
96
+ /**
97
+ * LangWatch prompt version ID attribute key
98
+ * Used to identify the specific version of a prompt
99
+ */
100
+ declare const ATTR_LANGWATCH_PROMPT_VERSION_ID = "langwatch.prompt.version.id";
101
+ /**
102
+ * LangWatch prompt variables attribute key
103
+ * Used to store variables used in prompt templates
104
+ */
105
+ declare const ATTR_LANGWATCH_PROMPT_VARIABLES = "langwatch.prompt.variables";
106
+ /**
107
+ * LangWatch prompt selected ID attribute key
108
+ * Used to identify which prompt was selected from a set
109
+ */
110
+ declare const ATTR_LANGWATCH_PROMPT_SELECTED_ID = "langwatch.prompt.selected.id";
111
+ /**
112
+ * LangWatch prompt version number attribute key
113
+ * Used to track the version number of a prompt
114
+ */
115
+ declare const ATTR_LANGWATCH_PROMPT_VERSION_NUMBER = "langwatch.prompt.version.number";
116
+ /**
117
+ * LangWatch LangChain tags attribute key
118
+ * Used to store tags associated with LangChain operations
119
+ */
120
+ declare const ATTR_LANGWATCH_LANGCHAIN_TAGS = "langwatch.langchain.tags";
121
+ /**
122
+ * LangWatch LangChain event name attribute key
123
+ * Used to identify the specific LangChain event type
124
+ */
125
+ declare const ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME = "langwatch.langchain.event_name";
126
+ /**
127
+ * LangWatch LangChain run ID attribute key
128
+ * Used to identify a specific LangChain run
129
+ */
130
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_ID = "langwatch.langchain.run.id";
131
+ /**
132
+ * LangWatch LangChain run tags attribute key
133
+ * Used to store tags associated with a LangChain run
134
+ */
135
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS = "langwatch.langchain.run.tags";
136
+ /**
137
+ * LangWatch LangChain run type attribute key
138
+ * Used to identify the type of LangChain run
139
+ */
140
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE = "langwatch.langchain.run.type";
141
+ /**
142
+ * LangWatch LangChain run metadata attribute key
143
+ * Used to store metadata associated with a LangChain run
144
+ */
145
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA = "langwatch.langchain.run.metadata";
146
+ /**
147
+ * LangWatch LangChain run extra parameters attribute key
148
+ * Used to store additional parameters for a LangChain run
149
+ */
150
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS = "langwatch.langchain.run.extra_params";
151
+ /**
152
+ * LangWatch LangChain run parent ID attribute key
153
+ * Used to identify the parent run in a hierarchical structure
154
+ */
155
+ declare const ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID = "langwatch.langchain.run.parent.id";
156
+
157
+ declare const langwatchAttributes_ATTR_LANGWATCH_CUSTOMER_ID: typeof ATTR_LANGWATCH_CUSTOMER_ID;
158
+ declare const langwatchAttributes_ATTR_LANGWATCH_EVALUATION_CUSTOM: typeof ATTR_LANGWATCH_EVALUATION_CUSTOM;
159
+ declare const langwatchAttributes_ATTR_LANGWATCH_INPUT: typeof ATTR_LANGWATCH_INPUT;
160
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME: typeof ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME;
161
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS;
162
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_ID: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_ID;
163
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA;
164
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID;
165
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS;
166
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE: typeof ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE;
167
+ declare const langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_TAGS: typeof ATTR_LANGWATCH_LANGCHAIN_TAGS;
168
+ declare const langwatchAttributes_ATTR_LANGWATCH_METRICS: typeof ATTR_LANGWATCH_METRICS;
169
+ declare const langwatchAttributes_ATTR_LANGWATCH_OUTPUT: typeof ATTR_LANGWATCH_OUTPUT;
170
+ declare const langwatchAttributes_ATTR_LANGWATCH_PARAMS: typeof ATTR_LANGWATCH_PARAMS;
171
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_HANDLE: typeof ATTR_LANGWATCH_PROMPT_HANDLE;
172
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_ID: typeof ATTR_LANGWATCH_PROMPT_ID;
173
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_SELECTED_ID: typeof ATTR_LANGWATCH_PROMPT_SELECTED_ID;
174
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_VARIABLES: typeof ATTR_LANGWATCH_PROMPT_VARIABLES;
175
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_ID: typeof ATTR_LANGWATCH_PROMPT_VERSION_ID;
176
+ declare const langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_NUMBER: typeof ATTR_LANGWATCH_PROMPT_VERSION_NUMBER;
177
+ declare const langwatchAttributes_ATTR_LANGWATCH_RAG_CONTEXTS: typeof ATTR_LANGWATCH_RAG_CONTEXTS;
178
+ declare const langwatchAttributes_ATTR_LANGWATCH_SDK_LANGUAGE: typeof ATTR_LANGWATCH_SDK_LANGUAGE;
179
+ declare const langwatchAttributes_ATTR_LANGWATCH_SDK_NAME: typeof ATTR_LANGWATCH_SDK_NAME;
180
+ declare const langwatchAttributes_ATTR_LANGWATCH_SDK_VERSION: typeof ATTR_LANGWATCH_SDK_VERSION;
181
+ declare const langwatchAttributes_ATTR_LANGWATCH_SPAN_TYPE: typeof ATTR_LANGWATCH_SPAN_TYPE;
182
+ declare const langwatchAttributes_ATTR_LANGWATCH_STREAMING: typeof ATTR_LANGWATCH_STREAMING;
183
+ declare const langwatchAttributes_ATTR_LANGWATCH_TAGS: typeof ATTR_LANGWATCH_TAGS;
184
+ declare const langwatchAttributes_ATTR_LANGWATCH_THREAD_ID: typeof ATTR_LANGWATCH_THREAD_ID;
185
+ declare const langwatchAttributes_ATTR_LANGWATCH_TIMESTAMPS: typeof ATTR_LANGWATCH_TIMESTAMPS;
186
+ declare const langwatchAttributes_ATTR_LANGWATCH_USER_ID: typeof ATTR_LANGWATCH_USER_ID;
187
+ declare namespace langwatchAttributes {
188
+ export { langwatchAttributes_ATTR_LANGWATCH_CUSTOMER_ID as ATTR_LANGWATCH_CUSTOMER_ID, langwatchAttributes_ATTR_LANGWATCH_EVALUATION_CUSTOM as ATTR_LANGWATCH_EVALUATION_CUSTOM, langwatchAttributes_ATTR_LANGWATCH_INPUT as ATTR_LANGWATCH_INPUT, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME as ATTR_LANGWATCH_LANGCHAIN_EVENT_NAME, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS as ATTR_LANGWATCH_LANGCHAIN_RUN_EXTRA_PARAMS, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_ID as ATTR_LANGWATCH_LANGCHAIN_RUN_ID, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA as ATTR_LANGWATCH_LANGCHAIN_RUN_METADATA, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID as ATTR_LANGWATCH_LANGCHAIN_RUN_PARENT_ID, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS as ATTR_LANGWATCH_LANGCHAIN_RUN_TAGS, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE as ATTR_LANGWATCH_LANGCHAIN_RUN_TYPE, langwatchAttributes_ATTR_LANGWATCH_LANGCHAIN_TAGS as ATTR_LANGWATCH_LANGCHAIN_TAGS, langwatchAttributes_ATTR_LANGWATCH_METRICS as ATTR_LANGWATCH_METRICS, langwatchAttributes_ATTR_LANGWATCH_OUTPUT as ATTR_LANGWATCH_OUTPUT, langwatchAttributes_ATTR_LANGWATCH_PARAMS as ATTR_LANGWATCH_PARAMS, langwatchAttributes_ATTR_LANGWATCH_PROMPT_HANDLE as ATTR_LANGWATCH_PROMPT_HANDLE, langwatchAttributes_ATTR_LANGWATCH_PROMPT_ID as ATTR_LANGWATCH_PROMPT_ID, langwatchAttributes_ATTR_LANGWATCH_PROMPT_SELECTED_ID as ATTR_LANGWATCH_PROMPT_SELECTED_ID, langwatchAttributes_ATTR_LANGWATCH_PROMPT_VARIABLES as ATTR_LANGWATCH_PROMPT_VARIABLES, langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_ID as ATTR_LANGWATCH_PROMPT_VERSION_ID, langwatchAttributes_ATTR_LANGWATCH_PROMPT_VERSION_NUMBER as ATTR_LANGWATCH_PROMPT_VERSION_NUMBER, langwatchAttributes_ATTR_LANGWATCH_RAG_CONTEXTS as ATTR_LANGWATCH_RAG_CONTEXTS, langwatchAttributes_ATTR_LANGWATCH_SDK_LANGUAGE as ATTR_LANGWATCH_SDK_LANGUAGE, langwatchAttributes_ATTR_LANGWATCH_SDK_NAME as ATTR_LANGWATCH_SDK_NAME, langwatchAttributes_ATTR_LANGWATCH_SDK_VERSION as ATTR_LANGWATCH_SDK_VERSION, langwatchAttributes_ATTR_LANGWATCH_SPAN_TYPE as ATTR_LANGWATCH_SPAN_TYPE, langwatchAttributes_ATTR_LANGWATCH_STREAMING as ATTR_LANGWATCH_STREAMING, langwatchAttributes_ATTR_LANGWATCH_TAGS as ATTR_LANGWATCH_TAGS, langwatchAttributes_ATTR_LANGWATCH_THREAD_ID as ATTR_LANGWATCH_THREAD_ID, langwatchAttributes_ATTR_LANGWATCH_TIMESTAMPS as ATTR_LANGWATCH_TIMESTAMPS, langwatchAttributes_ATTR_LANGWATCH_USER_ID as ATTR_LANGWATCH_USER_ID };
189
+ }
190
+
191
+ type OnlyStringValues<T> = {
192
+ [K in keyof T]: T[K] extends string ? T[K] : never;
193
+ }[keyof T];
194
+ /**
195
+ * Union type representing all possible attribute keys that can be used in spans.
196
+ *
197
+ * This includes:
198
+ * - Standard OpenTelemetry semantic convention attributes
199
+ * - LangWatch-specific attributes
200
+ * - Custom string attributes
201
+ *
202
+ * @example
203
+ * ```typescript
204
+ * const attributes: SemconvAttributes = {
205
+ * "http.method": "GET",
206
+ * "http.url": "https://api.example.com",
207
+ * "langwatch.span.type": "llm",
208
+ * "custom.attribute": "value"
209
+ * };
210
+ * ```
211
+ */
212
+ type SemConvAttributeKey = OnlyStringValues<typeof semconvIncubatingAttributes> | OnlyStringValues<typeof semconvAttributes> | OnlyStringValues<typeof langwatchAttributes> | (string & {});
213
+ /**
214
+ * Record type representing span attributes with semantic convention keys.
215
+ *
216
+ * This type ensures type safety when setting attributes on spans while
217
+ * allowing both standard OpenTelemetry semantic conventions and custom attributes.
218
+ *
219
+ * @example
220
+ * ```typescript
221
+ * const spanAttributes: SemConvAttributes = {
222
+ * "service.name": "my-service",
223
+ * "service.version": "1.0.0",
224
+ * "langwatch.span.type": "llm",
225
+ * "custom.user.id": "user123"
226
+ * };
227
+ * ```
228
+ */
229
+ type SemConvAttributes = Partial<Record<SemConvAttributeKey, AttributeValue>>;
230
+ /**
231
+ * Record type representing log record attributes with semantic convention keys.
232
+ *
233
+ * This type ensures type safety when setting attributes on log records while
234
+ * allowing both standard OpenTelemetry semantic conventions and custom attributes.
235
+ *
236
+ * @example
237
+ * ```typescript
238
+ * const logRecordAttributes: SemConvLogRecordAttributes = {
239
+ * "log.level": "INFO",
240
+ * "log.source": "my-service",
241
+ * "log.category": "test",
242
+ * "user.id": "12345",
243
+ * "string.attr": "string value",
244
+ * "number.attr": 42,
245
+ * "boolean.attr": true,
246
+ * "array.attr": ["item1", "item2", "item3"],
247
+ * "object.attr": { key1: "value1", key2: "value2" },
248
+ * "null.attr": null,
249
+ * };
250
+ * ```
251
+ */
252
+ type SemConvLogRecordAttributes = Partial<Record<SemConvAttributeKey, AnyValue>>;
253
+
254
+ export { type SemConvAttributes as S, type SemConvLogRecordAttributes as a, type SemConvAttributeKey as b, langwatchAttributes as l };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Data capture modes for controlling automatic capture behavior.
3
+ */
4
+ type DataCaptureMode = "none" | "input" | "output" | "all";
5
+ /**
6
+ * Context provided to data capture predicates for making decisions.
7
+ */
8
+ interface DataCaptureContext {
9
+ /** Type of span (e.g., "llm", "chain", "tool", "retriever") */
10
+ spanType: string;
11
+ /** Name of the operation being performed */
12
+ operationName: string;
13
+ /** Any additional attributes set on the span */
14
+ spanAttributes: Record<string, any>;
15
+ /** Environment (development, staging, production) */
16
+ environment?: string;
17
+ }
18
+ /**
19
+ * Predicate function for dynamic capture decisions.
20
+ *
21
+ * @param context - Context about the span and operation
22
+ * @returns Capture mode to use for this specific operation
23
+ */
24
+ type DataCapturePredicate = (context: DataCaptureContext) => DataCaptureMode;
25
+ /**
26
+ * Configuration for what data should be captured in spans.
27
+ *
28
+ * This provides simple control over input/output data capture
29
+ * by LangWatch instrumentations.
30
+ */
31
+ interface DataCaptureConfig {
32
+ /**
33
+ * Controls data capture behavior.
34
+ *
35
+ * @default "all"
36
+ */
37
+ mode?: DataCaptureMode;
38
+ }
39
+ /**
40
+ * Union type for all supported data capture configuration formats.
41
+ */
42
+ type DataCaptureOptions = DataCaptureMode | DataCaptureConfig;
43
+
44
+ export type { DataCaptureOptions as D, DataCaptureMode as a, DataCaptureConfig as b, DataCaptureContext as c, DataCapturePredicate as d };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Data capture modes for controlling automatic capture behavior.
3
+ */
4
+ type DataCaptureMode = "none" | "input" | "output" | "all";
5
+ /**
6
+ * Context provided to data capture predicates for making decisions.
7
+ */
8
+ interface DataCaptureContext {
9
+ /** Type of span (e.g., "llm", "chain", "tool", "retriever") */
10
+ spanType: string;
11
+ /** Name of the operation being performed */
12
+ operationName: string;
13
+ /** Any additional attributes set on the span */
14
+ spanAttributes: Record<string, any>;
15
+ /** Environment (development, staging, production) */
16
+ environment?: string;
17
+ }
18
+ /**
19
+ * Predicate function for dynamic capture decisions.
20
+ *
21
+ * @param context - Context about the span and operation
22
+ * @returns Capture mode to use for this specific operation
23
+ */
24
+ type DataCapturePredicate = (context: DataCaptureContext) => DataCaptureMode;
25
+ /**
26
+ * Configuration for what data should be captured in spans.
27
+ *
28
+ * This provides simple control over input/output data capture
29
+ * by LangWatch instrumentations.
30
+ */
31
+ interface DataCaptureConfig {
32
+ /**
33
+ * Controls data capture behavior.
34
+ *
35
+ * @default "all"
36
+ */
37
+ mode?: DataCaptureMode;
38
+ }
39
+ /**
40
+ * Union type for all supported data capture configuration formats.
41
+ */
42
+ type DataCaptureOptions = DataCaptureMode | DataCaptureConfig;
43
+
44
+ export type { DataCaptureOptions as D, DataCaptureMode as a, DataCaptureConfig as b, DataCaptureContext as c, DataCapturePredicate as d };