lmnr 0.6.17__tar.gz → 0.6.18__tar.gz

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 (61) hide show
  1. {lmnr-0.6.17 → lmnr-0.6.18}/PKG-INFO +72 -79
  2. {lmnr-0.6.17 → lmnr-0.6.18}/pyproject.toml +3 -7
  3. lmnr-0.6.18/src/lmnr/opentelemetry_lib/opentelemetry/instrumentation/opentelemetry/__init__.py +69 -0
  4. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/_instrument_initializers.py +11 -0
  5. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/instruments.py +7 -0
  6. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/version.py +1 -1
  7. lmnr-0.6.17/LICENSE +0 -75
  8. {lmnr-0.6.17 → lmnr-0.6.18}/README.md +0 -0
  9. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/__init__.py +0 -0
  10. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/cli.py +0 -0
  11. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/.flake8 +0 -0
  12. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/__init__.py +0 -0
  13. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/decorators/__init__.py +0 -0
  14. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/litellm/__init__.py +0 -0
  15. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/litellm/utils.py +0 -0
  16. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/__init__.py +0 -0
  17. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/config.py +0 -0
  18. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/opentelemetry/instrumentation/google_genai/utils.py +0 -0
  19. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/opentelemetry/instrumentation/langgraph/__init__.py +0 -0
  20. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/opentelemetry/instrumentation/langgraph/utils.py +0 -0
  21. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/opentelemetry/instrumentation/skyvern/__init__.py +0 -0
  22. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/__init__.py +0 -0
  23. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/attributes.py +0 -0
  24. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/context_properties.py +0 -0
  25. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/exporter.py +0 -0
  26. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/processor.py +0 -0
  27. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/tracing/tracer.py +0 -0
  28. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/utils/__init__.py +0 -0
  29. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/utils/json_encoder.py +0 -0
  30. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/opentelemetry_lib/utils/package_check.py +0 -0
  31. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/py.typed +0 -0
  32. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/__init__.py +0 -0
  33. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/browser/__init__.py +0 -0
  34. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/browser/browser_use_otel.py +0 -0
  35. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/browser/patchright_otel.py +0 -0
  36. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/browser/playwright_otel.py +0 -0
  37. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/browser/pw_utils.py +0 -0
  38. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/browser/rrweb/rrweb.umd.min.cjs +0 -0
  39. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/browser/utils.py +0 -0
  40. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/asynchronous/async_client.py +0 -0
  41. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/asynchronous/resources/__init__.py +0 -0
  42. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/asynchronous/resources/agent.py +0 -0
  43. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/asynchronous/resources/base.py +0 -0
  44. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/asynchronous/resources/browser_events.py +0 -0
  45. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/asynchronous/resources/evals.py +0 -0
  46. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/asynchronous/resources/tags.py +0 -0
  47. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/synchronous/resources/__init__.py +0 -0
  48. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/synchronous/resources/agent.py +0 -0
  49. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/synchronous/resources/base.py +0 -0
  50. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/synchronous/resources/browser_events.py +0 -0
  51. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/synchronous/resources/evals.py +0 -0
  52. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/synchronous/resources/tags.py +0 -0
  53. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/client/synchronous/sync_client.py +0 -0
  54. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/datasets.py +0 -0
  55. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/decorators.py +0 -0
  56. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/eval_control.py +0 -0
  57. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/evaluations.py +0 -0
  58. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/laminar.py +0 -0
  59. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/log.py +0 -0
  60. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/types.py +0 -0
  61. {lmnr-0.6.17 → lmnr-0.6.18}/src/lmnr/sdk/utils.py +0 -0
@@ -1,17 +1,78 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: lmnr
3
- Version: 0.6.17
3
+ Version: 0.6.18
4
4
  Summary: Python SDK for Laminar
5
- License: Apache-2.0
6
5
  Author: lmnr.ai
7
- Author-email: founders@lmnr.ai
8
- Requires-Python: >=3.10,<4
9
- Classifier: License :: OSI Approved :: Apache Software License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
6
+ Author-email: lmnr.ai <founders@lmnr.ai>
7
+ License-Expression: Apache-2.0
8
+ Requires-Dist: pydantic>=2.0.3,<3.0.0
9
+ Requires-Dist: python-dotenv>=1.0
10
+ Requires-Dist: opentelemetry-api>=1.33.0
11
+ Requires-Dist: opentelemetry-sdk>=1.33.0
12
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.33.0
13
+ Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.33.0
14
+ Requires-Dist: opentelemetry-semantic-conventions>=0.54b0
15
+ Requires-Dist: opentelemetry-semantic-conventions-ai>=0.4.8
16
+ Requires-Dist: tqdm>=4.0
17
+ Requires-Dist: tenacity>=8.0
18
+ Requires-Dist: grpcio>=1
19
+ Requires-Dist: httpx>=0.25.0
20
+ Requires-Dist: opentelemetry-instrumentation-threading>=0.54b0
21
+ Requires-Dist: opentelemetry-instrumentation-alephalpha>=0.40.12 ; extra == 'alephalpha'
22
+ Requires-Dist: opentelemetry-instrumentation-alephalpha>=0.40.12 ; extra == 'all'
23
+ Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.12 ; extra == 'all'
24
+ Requires-Dist: opentelemetry-instrumentation-bedrock>=0.40.12 ; extra == 'all'
25
+ Requires-Dist: opentelemetry-instrumentation-chromadb>=0.40.12 ; extra == 'all'
26
+ Requires-Dist: opentelemetry-instrumentation-cohere>=0.40.12 ; extra == 'all'
27
+ Requires-Dist: opentelemetry-instrumentation-crewai>=0.40.12 ; extra == 'all'
28
+ Requires-Dist: opentelemetry-instrumentation-google-generativeai<0.40.10 ; extra == 'all'
29
+ Requires-Dist: opentelemetry-instrumentation-groq>=0.40.12 ; extra == 'all'
30
+ Requires-Dist: opentelemetry-instrumentation-haystack>=0.40.12 ; extra == 'all'
31
+ Requires-Dist: opentelemetry-instrumentation-lancedb>=0.40.12 ; extra == 'all'
32
+ Requires-Dist: opentelemetry-instrumentation-langchain>=0.40.12 ; extra == 'all'
33
+ Requires-Dist: opentelemetry-instrumentation-llamaindex>=0.40.12 ; extra == 'all'
34
+ Requires-Dist: opentelemetry-instrumentation-marqo>=0.40.12 ; extra == 'all'
35
+ Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.12 ; extra == 'all'
36
+ Requires-Dist: opentelemetry-instrumentation-milvus>=0.40.12 ; extra == 'all'
37
+ Requires-Dist: opentelemetry-instrumentation-mistralai>=0.40.12 ; extra == 'all'
38
+ Requires-Dist: opentelemetry-instrumentation-ollama>=0.40.12 ; extra == 'all'
39
+ Requires-Dist: opentelemetry-instrumentation-openai>=0.40.12 ; extra == 'all'
40
+ Requires-Dist: opentelemetry-instrumentation-pinecone>=0.40.12 ; extra == 'all'
41
+ Requires-Dist: opentelemetry-instrumentation-qdrant>=0.40.12 ; extra == 'all'
42
+ Requires-Dist: opentelemetry-instrumentation-replicate>=0.40.12 ; extra == 'all'
43
+ Requires-Dist: opentelemetry-instrumentation-sagemaker>=0.40.12 ; extra == 'all'
44
+ Requires-Dist: opentelemetry-instrumentation-together>=0.40.12 ; extra == 'all'
45
+ Requires-Dist: opentelemetry-instrumentation-transformers>=0.40.12 ; extra == 'all'
46
+ Requires-Dist: opentelemetry-instrumentation-vertexai>=0.40.12 ; extra == 'all'
47
+ Requires-Dist: opentelemetry-instrumentation-watsonx>=0.40.12 ; extra == 'all'
48
+ Requires-Dist: opentelemetry-instrumentation-weaviate>=0.40.12 ; extra == 'all'
49
+ Requires-Dist: opentelemetry-instrumentation-anthropic>=0.40.12 ; extra == 'anthropic'
50
+ Requires-Dist: opentelemetry-instrumentation-bedrock>=0.40.12 ; extra == 'bedrock'
51
+ Requires-Dist: opentelemetry-instrumentation-chromadb>=0.40.12 ; extra == 'chromadb'
52
+ Requires-Dist: opentelemetry-instrumentation-cohere>=0.40.12 ; extra == 'cohere'
53
+ Requires-Dist: opentelemetry-instrumentation-crewai>=0.40.12 ; extra == 'crewai'
54
+ Requires-Dist: opentelemetry-instrumentation-google-generativeai<0.40.10 ; extra == 'google-generativeai'
55
+ Requires-Dist: opentelemetry-instrumentation-groq>=0.40.12 ; extra == 'groq'
56
+ Requires-Dist: opentelemetry-instrumentation-haystack>=0.40.12 ; extra == 'haystack'
57
+ Requires-Dist: opentelemetry-instrumentation-lancedb>=0.40.12 ; extra == 'lancedb'
58
+ Requires-Dist: opentelemetry-instrumentation-langchain>=0.40.12 ; extra == 'langchain'
59
+ Requires-Dist: opentelemetry-instrumentation-llamaindex>=0.40.12 ; extra == 'llamaindex'
60
+ Requires-Dist: opentelemetry-instrumentation-marqo>=0.40.12 ; extra == 'marqo'
61
+ Requires-Dist: opentelemetry-instrumentation-mcp>=0.40.12 ; extra == 'mcp'
62
+ Requires-Dist: opentelemetry-instrumentation-milvus>=0.40.12 ; extra == 'milvus'
63
+ Requires-Dist: opentelemetry-instrumentation-mistralai>=0.40.12 ; extra == 'mistralai'
64
+ Requires-Dist: opentelemetry-instrumentation-ollama>=0.40.12 ; extra == 'ollama'
65
+ Requires-Dist: opentelemetry-instrumentation-openai>=0.40.12 ; extra == 'openai'
66
+ Requires-Dist: opentelemetry-instrumentation-pinecone>=0.40.12 ; extra == 'pinecone'
67
+ Requires-Dist: opentelemetry-instrumentation-qdrant>=0.40.12 ; extra == 'qdrant'
68
+ Requires-Dist: opentelemetry-instrumentation-replicate>=0.40.12 ; extra == 'replicate'
69
+ Requires-Dist: opentelemetry-instrumentation-sagemaker>=0.40.12 ; extra == 'sagemaker'
70
+ Requires-Dist: opentelemetry-instrumentation-together>=0.40.12 ; extra == 'together'
71
+ Requires-Dist: opentelemetry-instrumentation-transformers>=0.40.12 ; extra == 'transformers'
72
+ Requires-Dist: opentelemetry-instrumentation-vertexai>=0.40.12 ; extra == 'vertexai'
73
+ Requires-Dist: opentelemetry-instrumentation-watsonx>=0.40.12 ; extra == 'watsonx'
74
+ Requires-Dist: opentelemetry-instrumentation-weaviate>=0.40.12 ; extra == 'weaviate'
75
+ Requires-Python: >=3.10, <4
15
76
  Provides-Extra: alephalpha
16
77
  Provides-Extra: all
17
78
  Provides-Extra: anthropic
@@ -40,73 +101,6 @@ Provides-Extra: transformers
40
101
  Provides-Extra: vertexai
41
102
  Provides-Extra: watsonx
42
103
  Provides-Extra: weaviate
43
- Requires-Dist: grpcio (>=1)
44
- Requires-Dist: httpx (>=0.25.0)
45
- Requires-Dist: opentelemetry-api (>=1.33.0)
46
- Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.33.0)
47
- Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.33.0)
48
- Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.40.12) ; extra == "alephalpha"
49
- Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.40.12) ; extra == "all"
50
- Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.40.12) ; extra == "all"
51
- Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.40.12) ; extra == "anthropic"
52
- Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.40.12) ; extra == "all"
53
- Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.40.12) ; extra == "bedrock"
54
- Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.40.12) ; extra == "all"
55
- Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.40.12) ; extra == "chromadb"
56
- Requires-Dist: opentelemetry-instrumentation-cohere (>=0.40.12) ; extra == "all"
57
- Requires-Dist: opentelemetry-instrumentation-cohere (>=0.40.12) ; extra == "cohere"
58
- Requires-Dist: opentelemetry-instrumentation-crewai (>=0.40.12) ; extra == "all"
59
- Requires-Dist: opentelemetry-instrumentation-crewai (>=0.40.12) ; extra == "crewai"
60
- Requires-Dist: opentelemetry-instrumentation-google-generativeai (<0.40.10) ; extra == "all"
61
- Requires-Dist: opentelemetry-instrumentation-google-generativeai (<0.40.10) ; extra == "google-generativeai"
62
- Requires-Dist: opentelemetry-instrumentation-groq (>=0.40.12) ; extra == "all"
63
- Requires-Dist: opentelemetry-instrumentation-groq (>=0.40.12) ; extra == "groq"
64
- Requires-Dist: opentelemetry-instrumentation-haystack (>=0.40.12) ; extra == "all"
65
- Requires-Dist: opentelemetry-instrumentation-haystack (>=0.40.12) ; extra == "haystack"
66
- Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.40.12) ; extra == "all"
67
- Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.40.12) ; extra == "lancedb"
68
- Requires-Dist: opentelemetry-instrumentation-langchain (>=0.40.12) ; extra == "all"
69
- Requires-Dist: opentelemetry-instrumentation-langchain (>=0.40.12) ; extra == "langchain"
70
- Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.40.12) ; extra == "all"
71
- Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.40.12) ; extra == "llamaindex"
72
- Requires-Dist: opentelemetry-instrumentation-marqo (>=0.40.12) ; extra == "all"
73
- Requires-Dist: opentelemetry-instrumentation-marqo (>=0.40.12) ; extra == "marqo"
74
- Requires-Dist: opentelemetry-instrumentation-mcp (>=0.40.12) ; extra == "all"
75
- Requires-Dist: opentelemetry-instrumentation-mcp (>=0.40.12) ; extra == "mcp"
76
- Requires-Dist: opentelemetry-instrumentation-milvus (>=0.40.12) ; extra == "all"
77
- Requires-Dist: opentelemetry-instrumentation-milvus (>=0.40.12) ; extra == "milvus"
78
- Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.40.12) ; extra == "all"
79
- Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.40.12) ; extra == "mistralai"
80
- Requires-Dist: opentelemetry-instrumentation-ollama (>=0.40.12) ; extra == "all"
81
- Requires-Dist: opentelemetry-instrumentation-ollama (>=0.40.12) ; extra == "ollama"
82
- Requires-Dist: opentelemetry-instrumentation-openai (>=0.40.12) ; extra == "all"
83
- Requires-Dist: opentelemetry-instrumentation-openai (>=0.40.12) ; extra == "openai"
84
- Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.40.12) ; extra == "all"
85
- Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.40.12) ; extra == "pinecone"
86
- Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.40.12) ; extra == "all"
87
- Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.40.12) ; extra == "qdrant"
88
- Requires-Dist: opentelemetry-instrumentation-replicate (>=0.40.12) ; extra == "all"
89
- Requires-Dist: opentelemetry-instrumentation-replicate (>=0.40.12) ; extra == "replicate"
90
- Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.40.12) ; extra == "all"
91
- Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.40.12) ; extra == "sagemaker"
92
- Requires-Dist: opentelemetry-instrumentation-threading (>=0.54b0)
93
- Requires-Dist: opentelemetry-instrumentation-together (>=0.40.12) ; extra == "all"
94
- Requires-Dist: opentelemetry-instrumentation-together (>=0.40.12) ; extra == "together"
95
- Requires-Dist: opentelemetry-instrumentation-transformers (>=0.40.12) ; extra == "all"
96
- Requires-Dist: opentelemetry-instrumentation-transformers (>=0.40.12) ; extra == "transformers"
97
- Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.40.12) ; extra == "all"
98
- Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.40.12) ; extra == "vertexai"
99
- Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.40.12) ; extra == "all"
100
- Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.40.12) ; extra == "watsonx"
101
- Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.40.12) ; extra == "all"
102
- Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.40.12) ; 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)
106
- Requires-Dist: pydantic (>=2.0.3,<3.0.0)
107
- Requires-Dist: python-dotenv (>=1.0)
108
- Requires-Dist: tenacity (>=8.0)
109
- Requires-Dist: tqdm (>=4.0)
110
104
  Description-Content-Type: text/markdown
111
105
 
112
106
  # Laminar Python
@@ -378,4 +372,3 @@ async for chunk in client.agent.run(
378
372
  elif chunk.chunk_type == 'finalOutput':
379
373
  print(chunk.content.result.content)
380
374
  ```
381
-
@@ -6,7 +6,7 @@
6
6
 
7
7
  [project]
8
8
  name = "lmnr"
9
- version = "0.6.17"
9
+ version = "0.6.18"
10
10
  description = "Python SDK for Laminar"
11
11
  authors = [
12
12
  { name = "lmnr.ai", email = "founders@lmnr.ai" }
@@ -138,12 +138,8 @@ dev = [
138
138
  ]
139
139
 
140
140
  [build-system]
141
- requires = ["poetry-core"]
142
- build-backend = "poetry.core.masonry.api"
141
+ requires = ["uv_build>=0.7.19,<0.8"]
142
+ build-backend = "uv_build"
143
143
 
144
144
  [tool.uv.workspace]
145
145
  members = ["examples/fastapi-app"]
146
- # we can move to uv_build, once it's more stable
147
- # https://github.com/astral-sh/uv/issues/3957
148
- # requires = ["uv_build>=0.6.16,<0.7"]
149
- # build-backend = "uv_build"
@@ -0,0 +1,69 @@
1
+ from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
2
+ from opentelemetry.instrumentation.utils import unwrap
3
+ from opentelemetry.trace import TraceFlags, SpanContext
4
+ from typing import Collection
5
+ from wrapt import wrap_function_wrapper
6
+ import logging
7
+
8
+
9
+ def _wrap_span_context(fn, instance, args, kwargs):
10
+ """
11
+ DataDog does something to the OpenTelemetry Contexts, so that when any code
12
+ tries to access the current active span, it returns a non-recording span.
13
+
14
+ There is nothing wrong about that per se, but they create their
15
+ NonRecordingSpan from an invalid SpanContext, because they don't
16
+ wrap the trace flags int/bitmap into a TraceFlags object.
17
+
18
+ It is an easy to miss bug, because `TraceFlags.SAMPLED` looks like an
19
+ instance of `TraceFlags`, but is actually just an integer 1, and the
20
+ proper way to create it is actually
21
+ `TraceFlags(TraceFlags.SAMPLED)` or `TraceFlags(0x1)`.
22
+
23
+ This is a problem because the trace flags are used to determine if a span
24
+ is sampled or not. If the trace flags are not wrapped, then the check
25
+ for sampling will fail, causing any span creation to fail, and sometimes
26
+ breaking the entire application.
27
+
28
+ Issue: https://github.com/DataDog/dd-trace-py/issues/12585
29
+ PR: https://github.com/DataDog/dd-trace-py/pull/12596
30
+ The PR only fixed the issue in one place, but it is still there in other places.
31
+ https://github.com/DataDog/dd-trace-py/pull/12596#issuecomment-2718239507
32
+
33
+ https://github.com/DataDog/dd-trace-py/blob/a8419a40fe9e73e0a84c4cab53094c384480a5a6/ddtrace/internal/opentelemetry/context.py#L83
34
+
35
+ We patch the `get_span_context` method to return a valid SpanContext.
36
+ """
37
+ res = fn(*args, **kwargs)
38
+
39
+ new_span_context = SpanContext(
40
+ trace_id=res.trace_id,
41
+ span_id=res.span_id,
42
+ is_remote=res.is_remote,
43
+ trace_state=res.trace_state,
44
+ trace_flags=TraceFlags(res.trace_flags),
45
+ )
46
+
47
+ return new_span_context
48
+
49
+
50
+ class OpentelemetryInstrumentor(BaseInstrumentor):
51
+ def __init__(self):
52
+ super().__init__()
53
+
54
+ def instrumentation_dependencies(self) -> Collection[str]:
55
+ return ("opentelemetry-api>=1.0.0",)
56
+
57
+ def _instrument(self, **kwargs):
58
+ try:
59
+ wrap_function_wrapper(
60
+ "opentelemetry.trace.span",
61
+ "NonRecordingSpan.get_span_context",
62
+ _wrap_span_context,
63
+ )
64
+
65
+ except Exception as e:
66
+ logging.debug(f"Error wrapping SpanContext: {e}")
67
+
68
+ def _uninstrument(self, **kwargs):
69
+ unwrap("opentelemetry.trace.span", "NonRecordingSpan.get_span_context")
@@ -274,6 +274,15 @@ class OpenAIInstrumentorInitializer(InstrumentorInitializer):
274
274
  )
275
275
 
276
276
 
277
+ class OpenTelemetryInstrumentorInitializer(InstrumentorInitializer):
278
+ def init_instrumentor(self, *args, **kwargs) -> BaseInstrumentor | None:
279
+ from ..opentelemetry.instrumentation.opentelemetry import (
280
+ OpentelemetryInstrumentor,
281
+ )
282
+
283
+ return OpentelemetryInstrumentor()
284
+
285
+
277
286
  class PatchrightInstrumentorInitializer(InstrumentorInitializer):
278
287
  def init_instrumentor(
279
288
  self, client, async_client, *args, **kwargs
@@ -345,6 +354,7 @@ class SageMakerInstrumentorInitializer(InstrumentorInitializer):
345
354
 
346
355
  return SageMakerInstrumentor()
347
356
 
357
+
348
358
  class SkyvernInstrumentorInitializer(InstrumentorInitializer):
349
359
  def init_instrumentor(self, *args, **kwargs) -> BaseInstrumentor | None:
350
360
  if not is_package_installed("skyvern"):
@@ -354,6 +364,7 @@ class SkyvernInstrumentorInitializer(InstrumentorInitializer):
354
364
 
355
365
  return SkyvernInstrumentor()
356
366
 
367
+
357
368
  class TogetherInstrumentorInitializer(InstrumentorInitializer):
358
369
  def init_instrumentor(self, *args, **kwargs) -> BaseInstrumentor | None:
359
370
  if not is_package_installed("together"):
@@ -34,6 +34,11 @@ class Instruments(Enum):
34
34
  MISTRAL = "mistral"
35
35
  OLLAMA = "ollama"
36
36
  OPENAI = "openai"
37
+ # Patch OpenTelemetry to fix DataDog's broken Span context
38
+ # See lmnr.opentelemetry_lib.opentelemetry.instrumentation.opentelemetry
39
+ # for more details.
40
+ OPENTELEMETRY = "opentelemetry"
41
+ ###
37
42
  PATCHRIGHT = "patchright"
38
43
  PINECONE = "pinecone"
39
44
  PLAYWRIGHT = "playwright"
@@ -47,6 +52,7 @@ class Instruments(Enum):
47
52
  WATSONX = "watsonx"
48
53
  WEAVIATE = "weaviate"
49
54
 
55
+
50
56
  INSTRUMENTATION_INITIALIZERS: dict[
51
57
  Instruments, initializers.InstrumentorInitializer
52
58
  ] = {
@@ -71,6 +77,7 @@ INSTRUMENTATION_INITIALIZERS: dict[
71
77
  Instruments.MISTRAL: initializers.MistralInstrumentorInitializer(),
72
78
  Instruments.OLLAMA: initializers.OllamaInstrumentorInitializer(),
73
79
  Instruments.OPENAI: initializers.OpenAIInstrumentorInitializer(),
80
+ Instruments.OPENTELEMETRY: initializers.OpenTelemetryInstrumentorInitializer(),
74
81
  Instruments.PATCHRIGHT: initializers.PatchrightInstrumentorInitializer(),
75
82
  Instruments.PINECONE: initializers.PineconeInstrumentorInitializer(),
76
83
  Instruments.PLAYWRIGHT: initializers.PlaywrightInstrumentorInitializer(),
@@ -3,7 +3,7 @@ import httpx
3
3
  from packaging import version
4
4
 
5
5
 
6
- __version__ = "0.6.17"
6
+ __version__ = "0.6.18"
7
7
  PYTHON_VERSION = f"{sys.version_info.major}.{sys.version_info.minor}"
8
8
 
9
9
 
lmnr-0.6.17/LICENSE DELETED
@@ -1,75 +0,0 @@
1
-
2
-
3
- Apache License
4
- Version 2.0, January 2004
5
- http://www.apache.org/licenses/
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. Definitions.
10
-
11
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
-
17
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
-
19
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
-
21
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
-
23
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
-
25
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
-
27
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
-
29
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
-
31
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
-
33
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
-
35
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
-
37
- You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
- You must cause any modified files to carry prominent notices stating that You changed the files; and
39
- You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
40
- If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
41
-
42
- You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
43
-
44
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
45
-
46
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
47
-
48
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
49
-
50
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
51
-
52
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
53
-
54
- END OF TERMS AND CONDITIONS
55
-
56
-
57
- APPENDIX: How to apply the Apache License to your work
58
-
59
- Include a copy of the Apache License, typically in a file called LICENSE, in your work, and consider also including a NOTICE file that references the License.
60
-
61
- To apply the Apache License to specific files in your work, attach the following boilerplate declaration, replacing the fields enclosed by brackets "[]" with your own identifying information. (Don't include the brackets!) Enclose the text in the appropriate comment syntax for the file format. We also recommend that you include a file or class name and description of purpose on the same "printed page" as the copyright notice for easier identification within third-party archives.
62
-
63
- Copyright 2024 LMNR AI, Inc.
64
-
65
- Licensed under the Apache License, Version 2.0 (the "License");
66
- you may not use this file except in compliance with the License.
67
- You may obtain a copy of the License at
68
-
69
- http://www.apache.org/licenses/LICENSE-2.0
70
-
71
- Unless required by applicable law or agreed to in writing, software
72
- distributed under the License is distributed on an "AS IS" BASIS,
73
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74
- See the License for the specific language governing permissions and
75
- limitations under the License.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes