lmnr 0.5.2__py3-none-any.whl → 0.6.0__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.
- lmnr/__init__.py +7 -2
- lmnr/cli.py +10 -8
- lmnr/opentelemetry_lib/__init__.py +55 -0
- lmnr/{openllmetry_sdk/decorators/base.py → opentelemetry_lib/decorators/__init__.py} +24 -15
- lmnr/{openllmetry_sdk → opentelemetry_lib}/opentelemetry/instrumentation/google_genai/utils.py +1 -1
- lmnr/opentelemetry_lib/tracing/__init__.py +139 -0
- lmnr/opentelemetry_lib/tracing/_instrument_initializers.py +398 -0
- lmnr/{openllmetry_sdk → opentelemetry_lib}/tracing/attributes.py +14 -7
- lmnr/opentelemetry_lib/tracing/context_properties.py +53 -0
- lmnr/opentelemetry_lib/tracing/exporter.py +60 -0
- lmnr/opentelemetry_lib/tracing/instruments.py +121 -0
- lmnr/opentelemetry_lib/tracing/processor.py +96 -0
- lmnr/{openllmetry_sdk/tracing/context_manager.py → opentelemetry_lib/tracing/tracer.py} +6 -1
- lmnr/{openllmetry_sdk → opentelemetry_lib}/utils/package_check.py +3 -1
- lmnr/sdk/browser/browser_use_otel.py +20 -3
- lmnr/sdk/browser/patchright_otel.py +177 -0
- lmnr/sdk/browser/playwright_otel.py +16 -7
- lmnr/sdk/browser/pw_utils.py +116 -74
- lmnr/sdk/browser/rrweb/rrweb.umd.min.cjs +98 -0
- lmnr/sdk/client/asynchronous/resources/agent.py +22 -1
- lmnr/sdk/client/synchronous/resources/agent.py +23 -1
- lmnr/sdk/decorators.py +5 -3
- lmnr/sdk/eval_control.py +3 -2
- lmnr/sdk/evaluations.py +10 -16
- lmnr/sdk/laminar.py +16 -34
- lmnr/sdk/types.py +2 -0
- lmnr/sdk/utils.py +2 -3
- lmnr/version.py +1 -1
- {lmnr-0.5.2.dist-info → lmnr-0.6.0.dist-info}/METADATA +65 -63
- lmnr-0.6.0.dist-info/RECORD +54 -0
- {lmnr-0.5.2.dist-info → lmnr-0.6.0.dist-info}/WHEEL +1 -1
- lmnr/openllmetry_sdk/__init__.py +0 -75
- lmnr/openllmetry_sdk/config/__init__.py +0 -12
- lmnr/openllmetry_sdk/decorators/__init__.py +0 -0
- lmnr/openllmetry_sdk/instruments.py +0 -41
- lmnr/openllmetry_sdk/tracing/__init__.py +0 -1
- lmnr/openllmetry_sdk/tracing/content_allow_list.py +0 -24
- lmnr/openllmetry_sdk/tracing/tracing.py +0 -998
- lmnr/openllmetry_sdk/utils/in_memory_span_exporter.py +0 -61
- lmnr/sdk/browser/rrweb/rrweb.min.js +0 -18
- lmnr-0.5.2.dist-info/RECORD +0 -54
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/.flake8 +0 -0
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/opentelemetry/instrumentation/google_genai/__init__.py +0 -0
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/opentelemetry/instrumentation/google_genai/config.py +0 -0
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/utils/__init__.py +0 -0
- /lmnr/{openllmetry_sdk → opentelemetry_lib}/utils/json_encoder.py +0 -0
- {lmnr-0.5.2.dist-info → lmnr-0.6.0.dist-info}/LICENSE +0 -0
- {lmnr-0.5.2.dist-info → lmnr-0.6.0.dist-info}/entry_points.txt +0 -0
@@ -1,14 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: lmnr
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.0
|
4
4
|
Summary: Python SDK for Laminar
|
5
5
|
License: Apache-2.0
|
6
6
|
Author: lmnr.ai
|
7
7
|
Author-email: founders@lmnr.ai
|
8
|
-
Requires-Python: >=3.
|
8
|
+
Requires-Python: >=3.10,<4
|
9
9
|
Classifier: License :: OSI Approved :: Apache Software License
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: Programming Language :: Python :: 3.9
|
12
11
|
Classifier: Programming Language :: Python :: 3.10
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
@@ -19,6 +18,7 @@ Provides-Extra: anthropic
|
|
19
18
|
Provides-Extra: bedrock
|
20
19
|
Provides-Extra: chromadb
|
21
20
|
Provides-Extra: cohere
|
21
|
+
Provides-Extra: crewai
|
22
22
|
Provides-Extra: google-generativeai
|
23
23
|
Provides-Extra: groq
|
24
24
|
Provides-Extra: haystack
|
@@ -26,6 +26,7 @@ Provides-Extra: lancedb
|
|
26
26
|
Provides-Extra: langchain
|
27
27
|
Provides-Extra: llamaindex
|
28
28
|
Provides-Extra: marqo
|
29
|
+
Provides-Extra: mcp
|
29
30
|
Provides-Extra: milvus
|
30
31
|
Provides-Extra: mistralai
|
31
32
|
Provides-Extra: ollama
|
@@ -42,65 +43,66 @@ Provides-Extra: weaviate
|
|
42
43
|
Requires-Dist: argparse (>=1.0)
|
43
44
|
Requires-Dist: grpcio (<1.68.0)
|
44
45
|
Requires-Dist: httpx (>=0.25.0)
|
45
|
-
Requires-Dist: opentelemetry-api (>=1.
|
46
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.
|
47
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.
|
48
|
-
Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.
|
49
|
-
Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.
|
50
|
-
Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.
|
51
|
-
Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.
|
52
|
-
Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.
|
53
|
-
Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.
|
54
|
-
Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.
|
55
|
-
Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.
|
56
|
-
Requires-Dist: opentelemetry-instrumentation-cohere (>=0.
|
57
|
-
Requires-Dist: opentelemetry-instrumentation-cohere (>=0.
|
58
|
-
Requires-Dist: opentelemetry-instrumentation-
|
59
|
-
Requires-Dist: opentelemetry-instrumentation-
|
60
|
-
Requires-Dist: opentelemetry-instrumentation-
|
61
|
-
Requires-Dist: opentelemetry-instrumentation-
|
62
|
-
Requires-Dist: opentelemetry-instrumentation-
|
63
|
-
Requires-Dist: opentelemetry-instrumentation-
|
64
|
-
Requires-Dist: opentelemetry-instrumentation-
|
65
|
-
Requires-Dist: opentelemetry-instrumentation-
|
66
|
-
Requires-Dist: opentelemetry-instrumentation-
|
67
|
-
Requires-Dist: opentelemetry-instrumentation-
|
68
|
-
Requires-Dist: opentelemetry-instrumentation-
|
69
|
-
Requires-Dist: opentelemetry-instrumentation-
|
70
|
-
Requires-Dist: opentelemetry-instrumentation-
|
71
|
-
Requires-Dist: opentelemetry-instrumentation-
|
72
|
-
Requires-Dist: opentelemetry-instrumentation-
|
73
|
-
Requires-Dist: opentelemetry-instrumentation-
|
74
|
-
Requires-Dist: opentelemetry-instrumentation-
|
75
|
-
Requires-Dist: opentelemetry-instrumentation-
|
76
|
-
Requires-Dist: opentelemetry-instrumentation-
|
77
|
-
Requires-Dist: opentelemetry-instrumentation-
|
78
|
-
Requires-Dist: opentelemetry-instrumentation-
|
79
|
-
Requires-Dist: opentelemetry-instrumentation-
|
80
|
-
Requires-Dist: opentelemetry-instrumentation-
|
81
|
-
Requires-Dist: opentelemetry-instrumentation-
|
82
|
-
Requires-Dist: opentelemetry-instrumentation-
|
83
|
-
Requires-Dist: opentelemetry-instrumentation-
|
84
|
-
Requires-Dist: opentelemetry-instrumentation-
|
85
|
-
Requires-Dist: opentelemetry-instrumentation-
|
86
|
-
Requires-Dist: opentelemetry-instrumentation-
|
87
|
-
Requires-Dist: opentelemetry-instrumentation-
|
88
|
-
Requires-Dist: opentelemetry-instrumentation-
|
89
|
-
Requires-Dist: opentelemetry-instrumentation-
|
90
|
-
Requires-Dist: opentelemetry-instrumentation-
|
91
|
-
Requires-Dist: opentelemetry-instrumentation-
|
92
|
-
Requires-Dist: opentelemetry-instrumentation-together (>=0.
|
93
|
-
Requires-Dist: opentelemetry-instrumentation-
|
94
|
-
Requires-Dist: opentelemetry-instrumentation-transformers (>=0.
|
95
|
-
Requires-Dist: opentelemetry-instrumentation-
|
96
|
-
Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.
|
97
|
-
Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.
|
98
|
-
Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.
|
99
|
-
Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.
|
100
|
-
Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.
|
101
|
-
Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.
|
102
|
-
Requires-Dist: opentelemetry-sdk (>=1.
|
103
|
-
Requires-Dist: opentelemetry-semantic-conventions
|
46
|
+
Requires-Dist: opentelemetry-api (>=1.33.0)
|
47
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.33.0)
|
48
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.33.0)
|
49
|
+
Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.40.5) ; extra == "alephalpha"
|
50
|
+
Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.40.5) ; extra == "all"
|
51
|
+
Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.40.5) ; extra == "all"
|
52
|
+
Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.40.5) ; extra == "anthropic"
|
53
|
+
Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.40.5) ; extra == "all"
|
54
|
+
Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.40.5) ; extra == "bedrock"
|
55
|
+
Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.40.5) ; extra == "all"
|
56
|
+
Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.40.5) ; extra == "chromadb"
|
57
|
+
Requires-Dist: opentelemetry-instrumentation-cohere (>=0.40.5) ; extra == "all"
|
58
|
+
Requires-Dist: opentelemetry-instrumentation-cohere (>=0.40.5) ; extra == "cohere"
|
59
|
+
Requires-Dist: opentelemetry-instrumentation-crewai (>=0.40.5) ; extra == "all"
|
60
|
+
Requires-Dist: opentelemetry-instrumentation-crewai (>=0.40.5) ; extra == "crewai"
|
61
|
+
Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.40.5) ; extra == "all"
|
62
|
+
Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.40.5) ; extra == "google-generativeai"
|
63
|
+
Requires-Dist: opentelemetry-instrumentation-groq (>=0.40.5) ; extra == "all"
|
64
|
+
Requires-Dist: opentelemetry-instrumentation-groq (>=0.40.5) ; extra == "groq"
|
65
|
+
Requires-Dist: opentelemetry-instrumentation-haystack (>=0.40.5) ; extra == "all"
|
66
|
+
Requires-Dist: opentelemetry-instrumentation-haystack (>=0.40.5) ; extra == "haystack"
|
67
|
+
Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.40.5) ; extra == "all"
|
68
|
+
Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.40.5) ; extra == "lancedb"
|
69
|
+
Requires-Dist: opentelemetry-instrumentation-langchain (>=0.40.5) ; extra == "all"
|
70
|
+
Requires-Dist: opentelemetry-instrumentation-langchain (>=0.40.5) ; extra == "langchain"
|
71
|
+
Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.40.5) ; extra == "all"
|
72
|
+
Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.40.5) ; extra == "llamaindex"
|
73
|
+
Requires-Dist: opentelemetry-instrumentation-marqo (>=0.40.5) ; extra == "all"
|
74
|
+
Requires-Dist: opentelemetry-instrumentation-marqo (>=0.40.5) ; extra == "marqo"
|
75
|
+
Requires-Dist: opentelemetry-instrumentation-mcp (>=0.40.5) ; extra == "all"
|
76
|
+
Requires-Dist: opentelemetry-instrumentation-mcp (>=0.40.5) ; extra == "mcp"
|
77
|
+
Requires-Dist: opentelemetry-instrumentation-milvus (>=0.40.5) ; extra == "all"
|
78
|
+
Requires-Dist: opentelemetry-instrumentation-milvus (>=0.40.5) ; extra == "milvus"
|
79
|
+
Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.40.5) ; extra == "all"
|
80
|
+
Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.40.5) ; extra == "mistralai"
|
81
|
+
Requires-Dist: opentelemetry-instrumentation-ollama (>=0.40.5) ; extra == "all"
|
82
|
+
Requires-Dist: opentelemetry-instrumentation-ollama (>=0.40.5) ; extra == "ollama"
|
83
|
+
Requires-Dist: opentelemetry-instrumentation-openai (>=0.40.5) ; extra == "all"
|
84
|
+
Requires-Dist: opentelemetry-instrumentation-openai (>=0.40.5) ; extra == "openai"
|
85
|
+
Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.40.5) ; extra == "all"
|
86
|
+
Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.40.5) ; extra == "pinecone"
|
87
|
+
Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.40.5) ; extra == "all"
|
88
|
+
Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.40.5) ; extra == "qdrant"
|
89
|
+
Requires-Dist: opentelemetry-instrumentation-replicate (>=0.40.5) ; extra == "all"
|
90
|
+
Requires-Dist: opentelemetry-instrumentation-replicate (>=0.40.5) ; extra == "replicate"
|
91
|
+
Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.40.5) ; extra == "all"
|
92
|
+
Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.40.5) ; extra == "sagemaker"
|
93
|
+
Requires-Dist: opentelemetry-instrumentation-together (>=0.40.5) ; extra == "all"
|
94
|
+
Requires-Dist: opentelemetry-instrumentation-together (>=0.40.5) ; extra == "together"
|
95
|
+
Requires-Dist: opentelemetry-instrumentation-transformers (>=0.40.5) ; extra == "all"
|
96
|
+
Requires-Dist: opentelemetry-instrumentation-transformers (>=0.40.5) ; extra == "transformers"
|
97
|
+
Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.40.5) ; extra == "all"
|
98
|
+
Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.40.5) ; extra == "vertexai"
|
99
|
+
Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.40.5) ; extra == "all"
|
100
|
+
Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.40.5) ; extra == "watsonx"
|
101
|
+
Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.40.5) ; extra == "all"
|
102
|
+
Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.40.5) ; extra == "weaviate"
|
103
|
+
Requires-Dist: opentelemetry-sdk (>=1.33.0)
|
104
|
+
Requires-Dist: opentelemetry-semantic-conventions (>=0.54b0)
|
105
|
+
Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.8)
|
104
106
|
Requires-Dist: pydantic (>=2.0.3,<3.0.0)
|
105
107
|
Requires-Dist: python-dotenv (>=1.0)
|
106
108
|
Requires-Dist: tenacity (>=8.0)
|
@@ -222,7 +224,7 @@ def handle_user_request(topic: str):
|
|
222
224
|
Laminar allows you to automatically instrument majority of the most popular LLM, Vector DB, database, requests, and other libraries.
|
223
225
|
|
224
226
|
If you want to automatically instrument a default set of libraries, then simply do NOT pass `instruments` argument to `.initialize()`.
|
225
|
-
See the full list of available instrumentations in the [enum](https://github.com/lmnr-ai/lmnr-python/blob/main/src/lmnr/
|
227
|
+
See the full list of available instrumentations in the [enum](https://github.com/lmnr-ai/lmnr-python/blob/main/src/lmnr/opentelemetry_lib/instruments.py).
|
226
228
|
|
227
229
|
If you want to automatically instrument only specific LLM, Vector DB, or other
|
228
230
|
calls with OpenTelemetry-compatible instrumentation, then pass the appropriate instruments to `.initialize()`.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
lmnr/__init__.py,sha256=eJ-gIHEk8KV-BeaU8c9spQww_T2G5_OMu4F8JEzngvA,1281
|
2
|
+
lmnr/cli.py,sha256=e_Jgcwn3Q-hgR6VLLar2ccWLAhJb8yB4cwoIdg5vwDs,3013
|
3
|
+
lmnr/opentelemetry_lib/.flake8,sha256=bCxuDlGx3YQ55QHKPiGJkncHanh9qGjQJUujcFa3lAU,150
|
4
|
+
lmnr/opentelemetry_lib/__init__.py,sha256=ai_eJynFwWWcrJ7yHUHyDfdjJ3q85GFjjp5pnjROLGI,1768
|
5
|
+
lmnr/opentelemetry_lib/decorators/__init__.py,sha256=fTO-p6CaLFw2-8HDVGUS1dvnfCMwUH5vZSYc6_NVAuU,7995
|
6
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/__init__.py,sha256=jrvHu8aq2EBGZI3ypucUltR4-v8HqTKnqGtWXF5Qbb8,15339
|
7
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/config.py,sha256=FeQOcC3RNq-yOd8KZ_VoBuZgDl6tnkxx6I2MKVH1GMI,256
|
8
|
+
lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/utils.py,sha256=P0fOmGi_0nv3cMFcdWblRuTsDRCZnvdM8GQ3zJT0qbM,6229
|
9
|
+
lmnr/opentelemetry_lib/tracing/__init__.py,sha256=dQMccjiEUe66ocb1cn0ZtPXdxgJpxUNAtzzFd_aEGW8,4771
|
10
|
+
lmnr/opentelemetry_lib/tracing/_instrument_initializers.py,sha256=CBgkfVKmvWWvSgN8eZHgEF92ED8K4VkXzz9d0QC4tIs,14269
|
11
|
+
lmnr/opentelemetry_lib/tracing/attributes.py,sha256=MvowVluXfCqSIC3Cvx3tWDqB0Cpr9bpSlY91qL4Iy74,1497
|
12
|
+
lmnr/opentelemetry_lib/tracing/context_properties.py,sha256=xMLitHrENwSW3U9_PweAFRIdTm8hqwHP4Vi3S8jazXA,1757
|
13
|
+
lmnr/opentelemetry_lib/tracing/exporter.py,sha256=vKsJCx8TMJ7NK4NmyJrygHH2aBaLMzIHVSzDt1-ABrs,2132
|
14
|
+
lmnr/opentelemetry_lib/tracing/instruments.py,sha256=KDnjJZbCC9arRgdksZfaBU4Oej0QBcS8b9JANe_ZbNU,5214
|
15
|
+
lmnr/opentelemetry_lib/tracing/processor.py,sha256=5gYBQj7VStID-nNqPGUmyEOfFIwJKuvmlhcU2kvv5KY,3493
|
16
|
+
lmnr/opentelemetry_lib/tracing/tracer.py,sha256=oNC6V8eFvuK3i5IWXsKDjEMFL_axeSov3L1fPevwuWM,476
|
17
|
+
lmnr/opentelemetry_lib/utils/__init__.py,sha256=pNhf0G3vTd5ccoc03i1MXDbricSaiqCbi1DLWhSekK8,604
|
18
|
+
lmnr/opentelemetry_lib/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
|
19
|
+
lmnr/opentelemetry_lib/utils/package_check.py,sha256=ST2BvDxt0bax-ih9F9Wf0jlKAErmztbxKmOcFf713rI,265
|
20
|
+
lmnr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
+
lmnr/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
+
lmnr/sdk/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
+
lmnr/sdk/browser/browser_use_otel.py,sha256=Cx8ZLoEGLAAOIvglmZEAxMkfmdwUfjrvxgiZ5vfY3Ko,4519
|
24
|
+
lmnr/sdk/browser/patchright_otel.py,sha256=O7n1dB_Mw-_L70zi0zqpnFFiKuTPEEpO7ry1ia6IXWQ,5454
|
25
|
+
lmnr/sdk/browser/playwright_otel.py,sha256=dPmdZo9MeSkPGNG8lUCP9JV1G7pW8MXLWT6xoFVOVUA,12672
|
26
|
+
lmnr/sdk/browser/pw_utils.py,sha256=Tw5kmONwPu9Q7_QHGIa-amotImQugGVFeEyMCUxmDhc,10243
|
27
|
+
lmnr/sdk/browser/rrweb/rrweb.umd.min.cjs,sha256=Ly2jiwC7hTEtgiXzBpoJNSE1Vkzu0lZPZS8brjusAW0,260896
|
28
|
+
lmnr/sdk/browser/utils.py,sha256=xPpMRP2y9aJIsdIDNg2wN4PSa_4w0LSsra-GIMx9VXc,2366
|
29
|
+
lmnr/sdk/client/asynchronous/async_client.py,sha256=NuGla1gGlyYLxyIQ6LSKG-b5eYGNIQA5HXAOzGQR5BU,4036
|
30
|
+
lmnr/sdk/client/asynchronous/resources/__init__.py,sha256=WL2ehX1LfxG3n7bsxzTRO8grM0YtMGb_r7DLMjkmm1Y,298
|
31
|
+
lmnr/sdk/client/asynchronous/resources/agent.py,sha256=NiX2azmQnzNYHpZT_Sme7Dm5cmDf2xp37YAwZIqCCrI,18276
|
32
|
+
lmnr/sdk/client/asynchronous/resources/base.py,sha256=aJ43Q1rltg23IQaI4eeaZKckxVTgDUbCJrChhQCUEoE,986
|
33
|
+
lmnr/sdk/client/asynchronous/resources/browser_events.py,sha256=T-DUbbAfMQ2VqiVfgVplxuTaJZuoNcC1O6RCxdfw7UQ,1163
|
34
|
+
lmnr/sdk/client/asynchronous/resources/evals.py,sha256=bm3ATwqLozUoW2Ed6psmdjmeJ7joBaQHSv6mBeA_cws,2187
|
35
|
+
lmnr/sdk/client/synchronous/resources/__init__.py,sha256=Sk0_5Y1UkqwUhJKRct9R3JAnHk6sPe8lDokpYVqehdY,250
|
36
|
+
lmnr/sdk/client/synchronous/resources/agent.py,sha256=vwf3XOHX4nF_W0t4qwqcpaGC2vdccaJ5iI920G1jPf0,18150
|
37
|
+
lmnr/sdk/client/synchronous/resources/base.py,sha256=ne1ZZ10UmNkMrECVvClcEJfcFJlSGvaXOC8K6mZTPdY,971
|
38
|
+
lmnr/sdk/client/synchronous/resources/browser_events.py,sha256=9rFYWZesXQomnFgbZ590tGFMTaNj0OAzT9RcFwD8q_Y,1135
|
39
|
+
lmnr/sdk/client/synchronous/resources/evals.py,sha256=sMMAai7_IW842z_J0W9OpthDhGQPCkTVJZamIkKq0wk,3496
|
40
|
+
lmnr/sdk/client/synchronous/sync_client.py,sha256=-sSMbUvgDLt98tT-nDyE_xfTohcGdn00lAmul1713Wo,4396
|
41
|
+
lmnr/sdk/datasets.py,sha256=jl5Wj5nEI9pww4Jwn4XKF8h0gXBU4TOIrhqNjTJsHZQ,1709
|
42
|
+
lmnr/sdk/decorators.py,sha256=NIen6dUhcryiWnoZTP6C6_llwPZqbGoOr8iWPorKWuY,3346
|
43
|
+
lmnr/sdk/eval_control.py,sha256=qMiAI6FnHdIwKX8-W1nDhEcS5Cjm5lYRoIN7x4J-AVI,182
|
44
|
+
lmnr/sdk/evaluations.py,sha256=SMCoYMHGwMKEXaGT6tR10dvXXU_OrazlYZCy11hKlQc,20444
|
45
|
+
lmnr/sdk/laminar.py,sha256=Zh4KCIDCOe7yTdZBbYNPXG_WxURSkzkJOR5wKFjQPj0,27180
|
46
|
+
lmnr/sdk/log.py,sha256=nt_YMmPw1IRbGy0b7q4rTtP4Yo3pQfNxqJPXK3nDSNQ,2213
|
47
|
+
lmnr/sdk/types.py,sha256=QOIZ18ELzts5AG1Tx-_twHI43_PHoB4X8JYynTH0MCA,12287
|
48
|
+
lmnr/sdk/utils.py,sha256=_kUn43AEn7Cdqcsg1CkQvzVQ7PhQT27m-iuLcRrwlZM,3891
|
49
|
+
lmnr/version.py,sha256=USfbIJ-o8QurfmN8Y-r1THrXx4dRuPHdtWhHLn46QTU,1321
|
50
|
+
lmnr-0.6.0.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
|
51
|
+
lmnr-0.6.0.dist-info/METADATA,sha256=-Lu3ClhnpKP7iwOrIe4Fp6vEY98gGpXOClE0D2iEs-E,15069
|
52
|
+
lmnr-0.6.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
53
|
+
lmnr-0.6.0.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
|
54
|
+
lmnr-0.6.0.dist-info/RECORD,,
|
lmnr/openllmetry_sdk/__init__.py
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
import sys
|
2
|
-
|
3
|
-
from typing import Optional, Set
|
4
|
-
from opentelemetry.sdk.trace import SpanProcessor
|
5
|
-
from opentelemetry.sdk.trace.export import SpanExporter
|
6
|
-
from opentelemetry.sdk.resources import SERVICE_NAME
|
7
|
-
from opentelemetry.propagators.textmap import TextMapPropagator
|
8
|
-
from opentelemetry.util.re import parse_env_headers
|
9
|
-
|
10
|
-
from lmnr.openllmetry_sdk.instruments import Instruments
|
11
|
-
from lmnr.openllmetry_sdk.config import (
|
12
|
-
is_content_tracing_enabled,
|
13
|
-
is_tracing_enabled,
|
14
|
-
)
|
15
|
-
from lmnr.openllmetry_sdk.tracing.tracing import TracerWrapper
|
16
|
-
from typing import Dict
|
17
|
-
|
18
|
-
|
19
|
-
class TracerManager:
|
20
|
-
__tracer_wrapper: TracerWrapper
|
21
|
-
|
22
|
-
@staticmethod
|
23
|
-
def init(
|
24
|
-
app_name: Optional[str] = sys.argv[0],
|
25
|
-
api_endpoint: str = "https://api.lmnr.ai",
|
26
|
-
api_key: Optional[str] = None,
|
27
|
-
headers: Dict[str, str] = {},
|
28
|
-
disable_batch=False,
|
29
|
-
exporter: Optional[SpanExporter] = None,
|
30
|
-
processor: Optional[SpanProcessor] = None,
|
31
|
-
propagator: Optional[TextMapPropagator] = None,
|
32
|
-
should_enrich_metrics: bool = False,
|
33
|
-
resource_attributes: dict = {},
|
34
|
-
instruments: Optional[Set[Instruments]] = None,
|
35
|
-
base_http_url: Optional[str] = None,
|
36
|
-
project_api_key: Optional[str] = None,
|
37
|
-
max_export_batch_size: Optional[int] = None,
|
38
|
-
) -> None:
|
39
|
-
if not is_tracing_enabled():
|
40
|
-
return
|
41
|
-
|
42
|
-
enable_content_tracing = is_content_tracing_enabled()
|
43
|
-
|
44
|
-
if isinstance(headers, str):
|
45
|
-
headers = parse_env_headers(headers)
|
46
|
-
|
47
|
-
if api_key and not exporter and not processor and not headers:
|
48
|
-
headers = {
|
49
|
-
"Authorization": f"Bearer {api_key}",
|
50
|
-
}
|
51
|
-
|
52
|
-
# Tracer init
|
53
|
-
resource_attributes.update({SERVICE_NAME: app_name})
|
54
|
-
TracerWrapper.set_static_params(
|
55
|
-
resource_attributes, enable_content_tracing, api_endpoint, headers
|
56
|
-
)
|
57
|
-
TracerManager.__tracer_wrapper = TracerWrapper(
|
58
|
-
disable_batch=disable_batch,
|
59
|
-
processor=processor,
|
60
|
-
propagator=propagator,
|
61
|
-
exporter=exporter,
|
62
|
-
should_enrich_metrics=should_enrich_metrics,
|
63
|
-
instruments=instruments,
|
64
|
-
base_http_url=base_http_url,
|
65
|
-
project_api_key=project_api_key,
|
66
|
-
max_export_batch_size=max_export_batch_size,
|
67
|
-
)
|
68
|
-
|
69
|
-
@staticmethod
|
70
|
-
def flush() -> bool:
|
71
|
-
return TracerManager.__tracer_wrapper.flush()
|
72
|
-
|
73
|
-
@staticmethod
|
74
|
-
def shutdown():
|
75
|
-
TracerManager.__tracer_wrapper.shutdown()
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
|
3
|
-
|
4
|
-
def is_tracing_enabled() -> bool:
|
5
|
-
return (os.getenv("TRACELOOP_TRACING_ENABLED") or "true").lower() == "true"
|
6
|
-
|
7
|
-
|
8
|
-
def is_content_tracing_enabled() -> bool:
|
9
|
-
return (os.getenv("TRACELOOP_TRACE_CONTENT") or "true").lower() == "true"
|
10
|
-
|
11
|
-
|
12
|
-
MAX_MANUAL_SPAN_PAYLOAD_SIZE = 1024 * 1024 # 1MB
|
File without changes
|
@@ -1,41 +0,0 @@
|
|
1
|
-
from enum import Enum
|
2
|
-
|
3
|
-
|
4
|
-
class Instruments(Enum):
|
5
|
-
# The list of libraries which will be autoinstrumented
|
6
|
-
# if no specific instruments are provided to initialize()
|
7
|
-
ALEPHALPHA = "alephalpha"
|
8
|
-
ANTHROPIC = "anthropic"
|
9
|
-
BEDROCK = "bedrock"
|
10
|
-
BROWSER_USE = "browser_use"
|
11
|
-
CHROMA = "chroma"
|
12
|
-
COHERE = "cohere"
|
13
|
-
GOOGLE_GENERATIVEAI = "google_generativeai"
|
14
|
-
GOOGLE_GENAI = "google_genai"
|
15
|
-
GROQ = "groq"
|
16
|
-
HAYSTACK = "haystack"
|
17
|
-
LANCEDB = "lancedb"
|
18
|
-
LANGCHAIN = "langchain"
|
19
|
-
LLAMA_INDEX = "llama_index"
|
20
|
-
MARQO = "marqo"
|
21
|
-
MILVUS = "milvus"
|
22
|
-
MISTRAL = "mistral"
|
23
|
-
OLLAMA = "ollama"
|
24
|
-
OPENAI = "openai"
|
25
|
-
PINECONE = "pinecone"
|
26
|
-
PLAYWRIGHT = "playwright"
|
27
|
-
QDRANT = "qdrant"
|
28
|
-
REPLICATE = "replicate"
|
29
|
-
SAGEMAKER = "sagemaker"
|
30
|
-
TOGETHER = "together"
|
31
|
-
TRANSFORMERS = "transformers"
|
32
|
-
VERTEXAI = "vertexai"
|
33
|
-
WATSONX = "watsonx"
|
34
|
-
WEAVIATE = "weaviate"
|
35
|
-
|
36
|
-
# The following libraries will not be autoinstrumented unless
|
37
|
-
# specified explicitly in the initialize() call.
|
38
|
-
REDIS = "redis"
|
39
|
-
REQUESTS = "requests"
|
40
|
-
URLLIB3 = "urllib3"
|
41
|
-
PYMYSQL = "pymysql"
|
@@ -1 +0,0 @@
|
|
1
|
-
from lmnr.openllmetry_sdk.tracing.context_manager import get_tracer
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# Manages list of associated properties for which content tracing
|
2
|
-
# (prompts, vector embeddings, etc.) is allowed.
|
3
|
-
class ContentAllowList:
|
4
|
-
def __new__(cls) -> "ContentAllowList":
|
5
|
-
if not hasattr(cls, "instance"):
|
6
|
-
obj = cls.instance = super(ContentAllowList, cls).__new__(cls)
|
7
|
-
obj._allow_list: list[dict] = []
|
8
|
-
|
9
|
-
return cls.instance
|
10
|
-
|
11
|
-
def is_allowed(self, association_properties: dict) -> bool:
|
12
|
-
for allow_list_item in self._allow_list:
|
13
|
-
if all(
|
14
|
-
[
|
15
|
-
association_properties.get(key) == value
|
16
|
-
for key, value in allow_list_item.items()
|
17
|
-
]
|
18
|
-
):
|
19
|
-
return True
|
20
|
-
|
21
|
-
return False
|
22
|
-
|
23
|
-
def load(self, response_json: dict):
|
24
|
-
self._allow_list = response_json["associationPropertyAllowList"]
|