lmnr 0.5.3__py3-none-any.whl → 0.6.1__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.
Files changed (33) hide show
  1. lmnr/__init__.py +6 -1
  2. lmnr/opentelemetry_lib/__init__.py +23 -36
  3. lmnr/opentelemetry_lib/decorators/__init__.py +219 -0
  4. lmnr/opentelemetry_lib/tracing/__init__.py +158 -1
  5. lmnr/opentelemetry_lib/tracing/_instrument_initializers.py +398 -0
  6. lmnr/opentelemetry_lib/tracing/attributes.py +14 -7
  7. lmnr/opentelemetry_lib/tracing/context_properties.py +53 -0
  8. lmnr/opentelemetry_lib/tracing/exporter.py +60 -0
  9. lmnr/opentelemetry_lib/tracing/instruments.py +121 -0
  10. lmnr/opentelemetry_lib/tracing/processor.py +96 -0
  11. lmnr/opentelemetry_lib/tracing/{context_manager.py → tracer.py} +6 -1
  12. lmnr/opentelemetry_lib/utils/package_check.py +3 -1
  13. lmnr/sdk/browser/browser_use_otel.py +1 -1
  14. lmnr/sdk/browser/playwright_otel.py +22 -7
  15. lmnr/sdk/browser/pw_utils.py +25 -9
  16. lmnr/sdk/client/asynchronous/resources/agent.py +3 -1
  17. lmnr/sdk/client/synchronous/resources/agent.py +3 -1
  18. lmnr/sdk/decorators.py +4 -2
  19. lmnr/sdk/evaluations.py +3 -3
  20. lmnr/sdk/laminar.py +28 -31
  21. lmnr/sdk/utils.py +2 -3
  22. lmnr/version.py +1 -1
  23. {lmnr-0.5.3.dist-info → lmnr-0.6.1.dist-info}/METADATA +65 -62
  24. {lmnr-0.5.3.dist-info → lmnr-0.6.1.dist-info}/RECORD +27 -28
  25. lmnr/opentelemetry_lib/config/__init__.py +0 -12
  26. lmnr/opentelemetry_lib/decorators/base.py +0 -210
  27. lmnr/opentelemetry_lib/instruments.py +0 -42
  28. lmnr/opentelemetry_lib/tracing/content_allow_list.py +0 -24
  29. lmnr/opentelemetry_lib/tracing/tracing.py +0 -1016
  30. lmnr/opentelemetry_lib/utils/in_memory_span_exporter.py +0 -61
  31. {lmnr-0.5.3.dist-info → lmnr-0.6.1.dist-info}/LICENSE +0 -0
  32. {lmnr-0.5.3.dist-info → lmnr-0.6.1.dist-info}/WHEEL +0 -0
  33. {lmnr-0.5.3.dist-info → lmnr-0.6.1.dist-info}/entry_points.txt +0 -0
@@ -1,14 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lmnr
3
- Version: 0.5.3
3
+ Version: 0.6.1
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.9,<4
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,67 @@ 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.31.1)
46
- Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.31.1)
47
- Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.31.1)
48
- Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.39.2) ; extra == "alephalpha"
49
- Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.39.2) ; extra == "all"
50
- Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.39.2) ; extra == "all"
51
- Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.39.2) ; extra == "anthropic"
52
- Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.39.2) ; extra == "all"
53
- Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.39.2) ; extra == "bedrock"
54
- Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.39.2) ; extra == "all"
55
- Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.39.2) ; extra == "chromadb"
56
- Requires-Dist: opentelemetry-instrumentation-cohere (>=0.39.2) ; extra == "all"
57
- Requires-Dist: opentelemetry-instrumentation-cohere (>=0.39.2) ; extra == "cohere"
58
- Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.39.2) ; extra == "all"
59
- Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.39.2) ; extra == "google-generativeai"
60
- Requires-Dist: opentelemetry-instrumentation-groq (>=0.39.2) ; extra == "all"
61
- Requires-Dist: opentelemetry-instrumentation-groq (>=0.39.2) ; extra == "groq"
62
- Requires-Dist: opentelemetry-instrumentation-haystack (>=0.39.2) ; extra == "all"
63
- Requires-Dist: opentelemetry-instrumentation-haystack (>=0.39.2) ; extra == "haystack"
64
- Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.39.2) ; extra == "all"
65
- Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.39.2) ; extra == "lancedb"
66
- Requires-Dist: opentelemetry-instrumentation-langchain (>=0.39.2) ; extra == "all"
67
- Requires-Dist: opentelemetry-instrumentation-langchain (>=0.39.2) ; extra == "langchain"
68
- Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.39.2) ; extra == "all"
69
- Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.39.2) ; extra == "llamaindex"
70
- Requires-Dist: opentelemetry-instrumentation-marqo (>=0.39.2) ; extra == "all"
71
- Requires-Dist: opentelemetry-instrumentation-marqo (>=0.39.2) ; extra == "marqo"
72
- Requires-Dist: opentelemetry-instrumentation-milvus (>=0.39.2) ; extra == "all"
73
- Requires-Dist: opentelemetry-instrumentation-milvus (>=0.39.2) ; extra == "milvus"
74
- Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.39.2) ; extra == "all"
75
- Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.39.2) ; extra == "mistralai"
76
- Requires-Dist: opentelemetry-instrumentation-ollama (>=0.39.2) ; extra == "all"
77
- Requires-Dist: opentelemetry-instrumentation-ollama (>=0.39.2) ; extra == "ollama"
78
- Requires-Dist: opentelemetry-instrumentation-openai (>=0.39.2) ; extra == "all"
79
- Requires-Dist: opentelemetry-instrumentation-openai (>=0.39.2) ; extra == "openai"
80
- Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.39.2) ; extra == "all"
81
- Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.39.2) ; extra == "pinecone"
82
- Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.39.2) ; extra == "all"
83
- Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.39.2) ; extra == "qdrant"
84
- Requires-Dist: opentelemetry-instrumentation-replicate (>=0.39.2) ; extra == "all"
85
- Requires-Dist: opentelemetry-instrumentation-replicate (>=0.39.2) ; extra == "replicate"
86
- Requires-Dist: opentelemetry-instrumentation-requests (>=0.52b0)
87
- Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.39.2) ; extra == "all"
88
- Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.39.2) ; extra == "sagemaker"
89
- Requires-Dist: opentelemetry-instrumentation-sqlalchemy (>=0.52b0)
90
- Requires-Dist: opentelemetry-instrumentation-threading (>=0.52b0)
91
- Requires-Dist: opentelemetry-instrumentation-together (>=0.39.2) ; extra == "all"
92
- Requires-Dist: opentelemetry-instrumentation-together (>=0.39.2) ; extra == "together"
93
- Requires-Dist: opentelemetry-instrumentation-transformers (>=0.39.2) ; extra == "all"
94
- Requires-Dist: opentelemetry-instrumentation-transformers (>=0.39.2) ; extra == "transformers"
95
- Requires-Dist: opentelemetry-instrumentation-urllib3 (>=0.52b0)
96
- Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.39.2) ; extra == "all"
97
- Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.39.2) ; extra == "vertexai"
98
- Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.39.2) ; extra == "all"
99
- Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.39.2) ; extra == "watsonx"
100
- Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.39.2) ; extra == "all"
101
- Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.39.2) ; extra == "weaviate"
102
- Requires-Dist: opentelemetry-sdk (>=1.31.1)
103
- Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.2)
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-threading (>=0.54b0)
94
+ Requires-Dist: opentelemetry-instrumentation-together (>=0.40.5) ; extra == "all"
95
+ Requires-Dist: opentelemetry-instrumentation-together (>=0.40.5) ; extra == "together"
96
+ Requires-Dist: opentelemetry-instrumentation-transformers (>=0.40.5) ; extra == "all"
97
+ Requires-Dist: opentelemetry-instrumentation-transformers (>=0.40.5) ; extra == "transformers"
98
+ Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.40.5) ; extra == "all"
99
+ Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.40.5) ; extra == "vertexai"
100
+ Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.40.5) ; extra == "all"
101
+ Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.40.5) ; extra == "watsonx"
102
+ Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.40.5) ; extra == "all"
103
+ Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.40.5) ; extra == "weaviate"
104
+ Requires-Dist: opentelemetry-sdk (>=1.33.0)
105
+ Requires-Dist: opentelemetry-semantic-conventions (>=0.54b0)
106
+ Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.8)
104
107
  Requires-Dist: pydantic (>=2.0.3,<3.0.0)
105
108
  Requires-Dist: python-dotenv (>=1.0)
106
109
  Requires-Dist: tenacity (>=8.0)
@@ -1,55 +1,54 @@
1
- lmnr/__init__.py,sha256=XS83LtneFT8Sa0_04LxrcLnwTJbP0QjU1uq8G1yQrbU,1024
1
+ lmnr/__init__.py,sha256=eJ-gIHEk8KV-BeaU8c9spQww_T2G5_OMu4F8JEzngvA,1281
2
2
  lmnr/cli.py,sha256=e_Jgcwn3Q-hgR6VLLar2ccWLAhJb8yB4cwoIdg5vwDs,3013
3
3
  lmnr/opentelemetry_lib/.flake8,sha256=bCxuDlGx3YQ55QHKPiGJkncHanh9qGjQJUujcFa3lAU,150
4
- lmnr/opentelemetry_lib/__init__.py,sha256=QsuzIbwzeH1qXvdvqLuqLjw_TQrUrXw2orbhxak1zok,2538
5
- lmnr/opentelemetry_lib/config/__init__.py,sha256=5aGdIdo1LffBkNwIBUbqzN6OUCMCrURU4b0rf5LBSI0,300
6
- lmnr/opentelemetry_lib/decorators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- lmnr/opentelemetry_lib/decorators/base.py,sha256=uJU0vX4NqNF48iEUeMPZ8zWpZg3nbxCMzK-hSxVsqQI,7440
8
- lmnr/opentelemetry_lib/instruments.py,sha256=q8CHY2rmfkJ1psNvyPR2pr27ZqTOGNgliNuiUoWB7nU,1162
4
+ lmnr/opentelemetry_lib/__init__.py,sha256=QMPaVYATF_rT50A-lqoJZaH6YlzRu1BQKPgw0L3Rxs0,2107
5
+ lmnr/opentelemetry_lib/decorators/__init__.py,sha256=fTO-p6CaLFw2-8HDVGUS1dvnfCMwUH5vZSYc6_NVAuU,7995
9
6
  lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/__init__.py,sha256=jrvHu8aq2EBGZI3ypucUltR4-v8HqTKnqGtWXF5Qbb8,15339
10
7
  lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/config.py,sha256=FeQOcC3RNq-yOd8KZ_VoBuZgDl6tnkxx6I2MKVH1GMI,256
11
8
  lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/utils.py,sha256=P0fOmGi_0nv3cMFcdWblRuTsDRCZnvdM8GQ3zJT0qbM,6229
12
- lmnr/opentelemetry_lib/tracing/__init__.py,sha256=wsjDg8GFn9NRbfZ4_JiB_lfiiLTd9iA8OugV57-mYcs,70
13
- lmnr/opentelemetry_lib/tracing/attributes.py,sha256=BEMMGrX_7kPu4PNCV7Bz1uaclY4DNhlaLT0bWwFQnRE,1366
14
- lmnr/opentelemetry_lib/tracing/content_allow_list.py,sha256=3feztm6PBWNelc8pAZUcQyEGyeSpNiVKjOaDk65l2ps,846
15
- lmnr/opentelemetry_lib/tracing/context_manager.py,sha256=kGCUrNU6BleNOQ2i-LKxktG5GQV3kjsyh6smxRsM16s,308
16
- lmnr/opentelemetry_lib/tracing/tracing.py,sha256=tp4SCcbwg4LXGjVyCkt6ccCwBytedhZ0GNxLEYjsSy0,37486
9
+ lmnr/opentelemetry_lib/tracing/__init__.py,sha256=7uGdMNAlUJv2HcNz3XAqpb7iUNsiQwSY9ipv8D2V10I,5713
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
17
  lmnr/opentelemetry_lib/utils/__init__.py,sha256=pNhf0G3vTd5ccoc03i1MXDbricSaiqCbi1DLWhSekK8,604
18
- lmnr/opentelemetry_lib/utils/in_memory_span_exporter.py,sha256=H_4TRaThMO1H6vUQ0OpQvzJk_fZH0OOsRAM1iZQXsR8,2112
19
18
  lmnr/opentelemetry_lib/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
20
- lmnr/opentelemetry_lib/utils/package_check.py,sha256=_-Fu9Zbp9tOyy27_-Rul7tDc8JaXYR2FmqF8SWOXSCc,244
19
+ lmnr/opentelemetry_lib/utils/package_check.py,sha256=ST2BvDxt0bax-ih9F9Wf0jlKAErmztbxKmOcFf713rI,265
21
20
  lmnr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
21
  lmnr/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
22
  lmnr/sdk/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- lmnr/sdk/browser/browser_use_otel.py,sha256=lwkHT8bQ11HKdeZjAoI5JrW4Shxrq7g1X6xmcUEK4EM,4524
23
+ lmnr/sdk/browser/browser_use_otel.py,sha256=Cx8ZLoEGLAAOIvglmZEAxMkfmdwUfjrvxgiZ5vfY3Ko,4519
25
24
  lmnr/sdk/browser/patchright_otel.py,sha256=O7n1dB_Mw-_L70zi0zqpnFFiKuTPEEpO7ry1ia6IXWQ,5454
26
- lmnr/sdk/browser/playwright_otel.py,sha256=dPmdZo9MeSkPGNG8lUCP9JV1G7pW8MXLWT6xoFVOVUA,12672
27
- lmnr/sdk/browser/pw_utils.py,sha256=xg7Qd-Ejn50B8DOa9ruLELDmKN_eyn0RVv0QRNp-rHw,10199
25
+ lmnr/sdk/browser/playwright_otel.py,sha256=LFg1iJXbez-BEgEIY9eaO_2T2uR6SxyfFL46fHcS7Mg,13423
26
+ lmnr/sdk/browser/pw_utils.py,sha256=nFqVujQb7owVFzT-31_g09CbfbBwUIXKxs3JxuE47ws,10835
28
27
  lmnr/sdk/browser/rrweb/rrweb.umd.min.cjs,sha256=Ly2jiwC7hTEtgiXzBpoJNSE1Vkzu0lZPZS8brjusAW0,260896
29
28
  lmnr/sdk/browser/utils.py,sha256=xPpMRP2y9aJIsdIDNg2wN4PSa_4w0LSsra-GIMx9VXc,2366
30
29
  lmnr/sdk/client/asynchronous/async_client.py,sha256=NuGla1gGlyYLxyIQ6LSKG-b5eYGNIQA5HXAOzGQR5BU,4036
31
30
  lmnr/sdk/client/asynchronous/resources/__init__.py,sha256=WL2ehX1LfxG3n7bsxzTRO8grM0YtMGb_r7DLMjkmm1Y,298
32
- lmnr/sdk/client/asynchronous/resources/agent.py,sha256=bpoNyRowogJRpstzchdt-Dlc1Frjh4MRVNO3RhPsiN0,18163
31
+ lmnr/sdk/client/asynchronous/resources/agent.py,sha256=NiX2azmQnzNYHpZT_Sme7Dm5cmDf2xp37YAwZIqCCrI,18276
33
32
  lmnr/sdk/client/asynchronous/resources/base.py,sha256=aJ43Q1rltg23IQaI4eeaZKckxVTgDUbCJrChhQCUEoE,986
34
33
  lmnr/sdk/client/asynchronous/resources/browser_events.py,sha256=T-DUbbAfMQ2VqiVfgVplxuTaJZuoNcC1O6RCxdfw7UQ,1163
35
34
  lmnr/sdk/client/asynchronous/resources/evals.py,sha256=bm3ATwqLozUoW2Ed6psmdjmeJ7joBaQHSv6mBeA_cws,2187
36
35
  lmnr/sdk/client/synchronous/resources/__init__.py,sha256=Sk0_5Y1UkqwUhJKRct9R3JAnHk6sPe8lDokpYVqehdY,250
37
- lmnr/sdk/client/synchronous/resources/agent.py,sha256=YMpXbyH7uKKhgeV-IWaZFJMjYfOU3XqrDoYxoebkaJ4,18043
36
+ lmnr/sdk/client/synchronous/resources/agent.py,sha256=vwf3XOHX4nF_W0t4qwqcpaGC2vdccaJ5iI920G1jPf0,18150
38
37
  lmnr/sdk/client/synchronous/resources/base.py,sha256=ne1ZZ10UmNkMrECVvClcEJfcFJlSGvaXOC8K6mZTPdY,971
39
38
  lmnr/sdk/client/synchronous/resources/browser_events.py,sha256=9rFYWZesXQomnFgbZ590tGFMTaNj0OAzT9RcFwD8q_Y,1135
40
39
  lmnr/sdk/client/synchronous/resources/evals.py,sha256=sMMAai7_IW842z_J0W9OpthDhGQPCkTVJZamIkKq0wk,3496
41
40
  lmnr/sdk/client/synchronous/sync_client.py,sha256=-sSMbUvgDLt98tT-nDyE_xfTohcGdn00lAmul1713Wo,4396
42
41
  lmnr/sdk/datasets.py,sha256=jl5Wj5nEI9pww4Jwn4XKF8h0gXBU4TOIrhqNjTJsHZQ,1709
43
- lmnr/sdk/decorators.py,sha256=8SRIvx53psMEIsU4QrdlAj2_nYrYvLUQtHuICbo1Sys,3331
42
+ lmnr/sdk/decorators.py,sha256=NIen6dUhcryiWnoZTP6C6_llwPZqbGoOr8iWPorKWuY,3346
44
43
  lmnr/sdk/eval_control.py,sha256=qMiAI6FnHdIwKX8-W1nDhEcS5Cjm5lYRoIN7x4J-AVI,182
45
- lmnr/sdk/evaluations.py,sha256=DNupsFQuY4fiFtg-iRmAyk59CiFgaIE62sWHiGJEH7g,20450
46
- lmnr/sdk/laminar.py,sha256=8571DiQsMWXdT0BKJrKCDhoVzk1wxJ_HXdqOST038o0,27996
44
+ lmnr/sdk/evaluations.py,sha256=SMCoYMHGwMKEXaGT6tR10dvXXU_OrazlYZCy11hKlQc,20444
45
+ lmnr/sdk/laminar.py,sha256=QbMbxdAhFzVIWzKQRtoVv9M5qMQj_cdhJ4ph3d22Rxs,28158
47
46
  lmnr/sdk/log.py,sha256=nt_YMmPw1IRbGy0b7q4rTtP4Yo3pQfNxqJPXK3nDSNQ,2213
48
47
  lmnr/sdk/types.py,sha256=QOIZ18ELzts5AG1Tx-_twHI43_PHoB4X8JYynTH0MCA,12287
49
- lmnr/sdk/utils.py,sha256=_8t_KGnSJUIOfwAsNDEcI3YP2PuQdht2Pg2Rq7yaI08,3912
50
- lmnr/version.py,sha256=S5lDEgXfAEPHUdUirfHaQvB6Fnz5RLgf_ECDTnPfNgU,1321
51
- lmnr-0.5.3.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
52
- lmnr-0.5.3.dist-info/METADATA,sha256=g7YX_kYFp7oAE30CVA_fmyes_v-LcYDhZK-7XshH2no,14959
53
- lmnr-0.5.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
54
- lmnr-0.5.3.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
55
- lmnr-0.5.3.dist-info/RECORD,,
48
+ lmnr/sdk/utils.py,sha256=_kUn43AEn7Cdqcsg1CkQvzVQ7PhQT27m-iuLcRrwlZM,3891
49
+ lmnr/version.py,sha256=gIiYGEDo229n5RGCEUAivOOfgZPjhsZSIzuJPxtIZvQ,1321
50
+ lmnr-0.6.1.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
51
+ lmnr-0.6.1.dist-info/METADATA,sha256=dBBwpBlKLQXHADF1afzpoffOLDIEJmA9ac8diguBYWM,15135
52
+ lmnr-0.6.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
53
+ lmnr-0.6.1.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
54
+ lmnr-0.6.1.dist-info/RECORD,,
@@ -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
@@ -1,210 +0,0 @@
1
- import json
2
- from functools import wraps
3
- import logging
4
- import pydantic
5
- import types
6
- from typing import Any, Literal, Optional, Union
7
-
8
- from opentelemetry import trace
9
- from opentelemetry import context as context_api
10
- from opentelemetry.trace import Span
11
-
12
- from lmnr.sdk.utils import get_input_from_func_args, is_method
13
- from lmnr.opentelemetry_lib.tracing import get_tracer
14
- from lmnr.opentelemetry_lib.tracing.attributes import SPAN_INPUT, SPAN_OUTPUT, SPAN_TYPE
15
- from lmnr.opentelemetry_lib.tracing.tracing import TracerWrapper
16
- from lmnr.opentelemetry_lib.utils.json_encoder import JSONEncoder
17
- from lmnr.opentelemetry_lib.config import MAX_MANUAL_SPAN_PAYLOAD_SIZE
18
-
19
-
20
- class CustomJSONEncoder(JSONEncoder):
21
- def default(self, o: Any) -> Any:
22
- if isinstance(o, pydantic.BaseModel):
23
- return o.model_dump_json()
24
- try:
25
- return super().default(o)
26
- except TypeError:
27
- return str(o) # Fallback to string representation for unsupported types
28
-
29
-
30
- def json_dumps(data: dict) -> str:
31
- try:
32
- return json.dumps(data, cls=CustomJSONEncoder)
33
- except Exception:
34
- # Log the exception and return a placeholder if serialization completely fails
35
- logging.warning("Failed to serialize data to JSON, type: %s", type(data))
36
- return "{}" # Return an empty JSON object as a fallback
37
-
38
-
39
- def entity_method(
40
- name: Optional[str] = None,
41
- ignore_input: bool = False,
42
- ignore_inputs: Optional[list[str]] = None,
43
- ignore_output: bool = False,
44
- span_type: Union[Literal["DEFAULT"], Literal["LLM"], Literal["TOOL"]] = "DEFAULT",
45
- ):
46
- def decorate(fn):
47
- @wraps(fn)
48
- def wrap(*args, **kwargs):
49
- if not TracerWrapper.verify_initialized():
50
- return fn(*args, **kwargs)
51
-
52
- span_name = name or fn.__name__
53
-
54
- with get_tracer() as tracer:
55
- span = tracer.start_span(span_name, attributes={SPAN_TYPE: span_type})
56
-
57
- ctx = trace.set_span_in_context(span, context_api.get_current())
58
- ctx_token = context_api.attach(ctx)
59
-
60
- try:
61
- if not ignore_input:
62
- inp = json_dumps(
63
- get_input_from_func_args(
64
- fn,
65
- is_method=is_method(fn),
66
- func_args=args,
67
- func_kwargs=kwargs,
68
- ignore_inputs=ignore_inputs,
69
- )
70
- )
71
- if len(inp) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
72
- span.set_attribute(
73
- SPAN_INPUT, "Laminar: input too large to record"
74
- )
75
- else:
76
- span.set_attribute(SPAN_INPUT, inp)
77
- except TypeError:
78
- pass
79
-
80
- try:
81
- res = fn(*args, **kwargs)
82
- except Exception as e:
83
- _process_exception(span, e)
84
- span.end()
85
- raise e
86
-
87
- # span will be ended in the generator
88
- if isinstance(res, types.GeneratorType):
89
- return _handle_generator(span, res)
90
-
91
- try:
92
- if not ignore_output:
93
- output = json_dumps(res)
94
- if len(output) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
95
- span.set_attribute(
96
- SPAN_OUTPUT, "Laminar: output too large to record"
97
- )
98
- else:
99
- span.set_attribute(SPAN_OUTPUT, output)
100
- except TypeError:
101
- pass
102
-
103
- span.end()
104
- context_api.detach(ctx_token)
105
-
106
- return res
107
-
108
- return wrap
109
-
110
- return decorate
111
-
112
-
113
- # Async Decorators
114
- def aentity_method(
115
- name: Optional[str] = None,
116
- ignore_input: bool = False,
117
- ignore_inputs: Optional[list[str]] = None,
118
- ignore_output: bool = False,
119
- span_type: Union[Literal["DEFAULT"], Literal["LLM"], Literal["TOOL"]] = "DEFAULT",
120
- ):
121
- def decorate(fn):
122
- @wraps(fn)
123
- async def wrap(*args, **kwargs):
124
- if not TracerWrapper.verify_initialized():
125
- return await fn(*args, **kwargs)
126
-
127
- span_name = name or fn.__name__
128
-
129
- with get_tracer() as tracer:
130
- span = tracer.start_span(span_name, attributes={SPAN_TYPE: span_type})
131
-
132
- ctx = trace.set_span_in_context(span, context_api.get_current())
133
- ctx_token = context_api.attach(ctx)
134
-
135
- try:
136
- if not ignore_input:
137
- inp = json_dumps(
138
- get_input_from_func_args(
139
- fn,
140
- is_method=is_method(fn),
141
- func_args=args,
142
- func_kwargs=kwargs,
143
- ignore_inputs=ignore_inputs,
144
- )
145
- )
146
- if len(inp) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
147
- span.set_attribute(
148
- SPAN_INPUT, "Laminar: input too large to record"
149
- )
150
- else:
151
- span.set_attribute(SPAN_INPUT, inp)
152
- except TypeError:
153
- pass
154
-
155
- try:
156
- res = await fn(*args, **kwargs)
157
- except Exception as e:
158
- _process_exception(span, e)
159
- span.end()
160
- raise e
161
-
162
- # span will be ended in the generator
163
- if isinstance(res, types.AsyncGeneratorType):
164
- return await _ahandle_generator(span, ctx_token, res)
165
-
166
- try:
167
- if not ignore_output:
168
- output = json_dumps(res)
169
- if len(output) > MAX_MANUAL_SPAN_PAYLOAD_SIZE:
170
- span.set_attribute(
171
- SPAN_OUTPUT, "Laminar: output too large to record"
172
- )
173
- else:
174
- span.set_attribute(SPAN_OUTPUT, output)
175
- except TypeError:
176
- pass
177
-
178
- span.end()
179
- context_api.detach(ctx_token)
180
-
181
- return res
182
-
183
- return wrap
184
-
185
- return decorate
186
-
187
-
188
- def _handle_generator(span, res):
189
- # for some reason the SPAN_KEY is not being set in the context of the generator, so we re-set it
190
- context_api.attach(trace.set_span_in_context(span))
191
- yield from res
192
-
193
- span.end()
194
-
195
- # Note: we don't detach the context here as this fails in some situations
196
- # https://github.com/open-telemetry/opentelemetry-python/issues/2606
197
- # This is not a problem since the context will be detached automatically during garbage collection
198
-
199
-
200
- async def _ahandle_generator(span, ctx_token, res):
201
- async for part in res:
202
- yield part
203
-
204
- span.end()
205
- context_api.detach(ctx_token)
206
-
207
-
208
- def _process_exception(span: Span, e: Exception):
209
- # Note that this `escaped` is sent as a StringValue("True"), not a boolean.
210
- span.record_exception(e, escaped=True)
@@ -1,42 +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
- PATCHRIGHT = "patchright"
28
- QDRANT = "qdrant"
29
- REPLICATE = "replicate"
30
- SAGEMAKER = "sagemaker"
31
- TOGETHER = "together"
32
- TRANSFORMERS = "transformers"
33
- VERTEXAI = "vertexai"
34
- WATSONX = "watsonx"
35
- WEAVIATE = "weaviate"
36
-
37
- # The following libraries will not be autoinstrumented unless
38
- # specified explicitly in the initialize() call.
39
- REDIS = "redis"
40
- REQUESTS = "requests"
41
- URLLIB3 = "urllib3"
42
- PYMYSQL = "pymysql"
@@ -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"]