lmnr 0.4.51b0__py3-none-any.whl → 0.4.53__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.
@@ -70,7 +70,7 @@ class TracerWrapper(object):
70
70
  headers: Dict[str, str] = {}
71
71
  __tracer_provider: TracerProvider = None
72
72
  __logger: logging.Logger = None
73
- __span_id_to_path: dict[int, str] = {}
73
+ __span_id_to_path: dict[int, list[str]] = {}
74
74
 
75
75
  def __new__(
76
76
  cls,
@@ -155,7 +155,7 @@ class TracerWrapper(object):
155
155
  parent_span_path = span_path_in_context or (
156
156
  self.__span_id_to_path.get(span.parent.span_id) if span.parent else None
157
157
  )
158
- span_path = f"{parent_span_path}.{span.name}" if parent_span_path else span.name
158
+ span_path = parent_span_path + [span.name] if parent_span_path else [span.name]
159
159
  span.set_attribute(SPAN_PATH, span_path)
160
160
  set_value("span_path", span_path, get_current())
161
161
  self.__span_id_to_path[span.get_span_context().span_id] = span_path
lmnr/sdk/laminar.py CHANGED
@@ -12,7 +12,6 @@ from lmnr.openllmetry_sdk.tracing.attributes import (
12
12
  from lmnr.openllmetry_sdk.decorators.base import json_dumps
13
13
  from opentelemetry import context as context_api, trace
14
14
  from opentelemetry.context import attach, detach
15
- from opentelemetry.sdk.trace import SpanProcessor
16
15
  from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
17
16
  from opentelemetry.util.types import AttributeValue
18
17
 
@@ -78,7 +77,6 @@ class Laminar:
78
77
  http_port: Optional[int] = None,
79
78
  grpc_port: Optional[int] = None,
80
79
  instruments: Optional[Set[Instruments]] = None,
81
- _processor: Optional[SpanProcessor] = None,
82
80
  disable_batch: bool = False,
83
81
  ):
84
82
  """Initialize Laminar context across the application.
@@ -104,6 +102,14 @@ class Laminar:
104
102
  If not specified, defaults to 443.
105
103
  grpc_port (Optional[int], optional): Laminar API grpc port.\
106
104
  If not specified, defaults to 8443.
105
+ instruments (Optional[Set[Instruments]], optional): Instruments to\
106
+ enable. Defaults to all instruments. You can pass\
107
+ an empty set to disable all instruments. Read more:\
108
+ https://docs.lmnr.ai/tracing/automatic-instrumentation
109
+ disable_batch (bool, optional): If set to True, spans will be sent\
110
+ immediately to the backend. Useful for debugging, but\
111
+ may cause performance overhead in production.
112
+ Defaults to False.
107
113
 
108
114
  Raises:
109
115
  ValueError: If project API key is not set
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lmnr
3
- Version: 0.4.51b0
3
+ Version: 0.4.53
4
4
  Summary: Python SDK for Laminar
5
5
  License: Apache-2.0
6
6
  Author: lmnr.ai
@@ -46,63 +46,62 @@ Requires-Dist: opentelemetry-api (>=1.28.0)
46
46
  Requires-Dist: opentelemetry-exporter-otlp-proto-grpc (>=1.28.0)
47
47
  Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.28.0)
48
48
  Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.35.0) ; extra == "alephalpha"
49
- Requires-Dist: opentelemetry-instrumentation-alephalpha ; extra == "all"
49
+ Requires-Dist: opentelemetry-instrumentation-alephalpha (>=0.35.0) ; extra == "all"
50
+ Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.35.0) ; extra == "all"
50
51
  Requires-Dist: opentelemetry-instrumentation-anthropic (>=0.35.0) ; extra == "anthropic"
51
- Requires-Dist: opentelemetry-instrumentation-anthropic ; extra == "all"
52
+ Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.35.0) ; extra == "all"
52
53
  Requires-Dist: opentelemetry-instrumentation-bedrock (>=0.35.0) ; extra == "bedrock"
53
- Requires-Dist: opentelemetry-instrumentation-bedrock ; extra == "all"
54
+ Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.35.0) ; extra == "all"
54
55
  Requires-Dist: opentelemetry-instrumentation-chromadb (>=0.35.0) ; extra == "chromadb"
55
- Requires-Dist: opentelemetry-instrumentation-chromadb ; extra == "all"
56
+ Requires-Dist: opentelemetry-instrumentation-cohere (>=0.35.0) ; extra == "all"
56
57
  Requires-Dist: opentelemetry-instrumentation-cohere (>=0.35.0) ; extra == "cohere"
57
- Requires-Dist: opentelemetry-instrumentation-cohere ; extra == "all"
58
+ Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.35.0) ; extra == "all"
58
59
  Requires-Dist: opentelemetry-instrumentation-google-generativeai (>=0.35.0) ; extra == "google-generativeai"
59
- Requires-Dist: opentelemetry-instrumentation-google-generativeai ; extra == "all"
60
+ Requires-Dist: opentelemetry-instrumentation-groq (>=0.35.0) ; extra == "all"
60
61
  Requires-Dist: opentelemetry-instrumentation-groq (>=0.35.0) ; extra == "groq"
61
- Requires-Dist: opentelemetry-instrumentation-groq ; extra == "all"
62
+ Requires-Dist: opentelemetry-instrumentation-haystack (>=0.35.0) ; extra == "all"
62
63
  Requires-Dist: opentelemetry-instrumentation-haystack (>=0.35.0) ; extra == "haystack"
63
- Requires-Dist: opentelemetry-instrumentation-haystack ; extra == "all"
64
+ Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.35.0) ; extra == "all"
64
65
  Requires-Dist: opentelemetry-instrumentation-lancedb (>=0.35.0) ; extra == "lancedb"
65
- Requires-Dist: opentelemetry-instrumentation-lancedb ; extra == "all"
66
+ Requires-Dist: opentelemetry-instrumentation-langchain (>=0.35.0) ; extra == "all"
66
67
  Requires-Dist: opentelemetry-instrumentation-langchain (>=0.35.0) ; extra == "langchain"
67
- Requires-Dist: opentelemetry-instrumentation-langchain ; extra == "all"
68
+ Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.35.0) ; extra == "all"
68
69
  Requires-Dist: opentelemetry-instrumentation-llamaindex (>=0.35.0) ; extra == "llamaindex"
69
- Requires-Dist: opentelemetry-instrumentation-llamaindex ; extra == "all"
70
+ Requires-Dist: opentelemetry-instrumentation-marqo (>=0.35.0) ; extra == "all"
70
71
  Requires-Dist: opentelemetry-instrumentation-marqo (>=0.35.0) ; extra == "marqo"
71
- Requires-Dist: opentelemetry-instrumentation-marqo ; extra == "all"
72
+ Requires-Dist: opentelemetry-instrumentation-milvus (>=0.35.0) ; extra == "all"
72
73
  Requires-Dist: opentelemetry-instrumentation-milvus (>=0.35.0) ; extra == "milvus"
73
- Requires-Dist: opentelemetry-instrumentation-milvus ; extra == "all"
74
+ Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.35.0) ; extra == "all"
74
75
  Requires-Dist: opentelemetry-instrumentation-mistralai (>=0.35.0) ; extra == "mistralai"
75
- Requires-Dist: opentelemetry-instrumentation-mistralai ; extra == "all"
76
+ Requires-Dist: opentelemetry-instrumentation-ollama (>=0.35.0) ; extra == "all"
76
77
  Requires-Dist: opentelemetry-instrumentation-ollama (>=0.35.0) ; extra == "ollama"
77
- Requires-Dist: opentelemetry-instrumentation-ollama ; extra == "all"
78
+ Requires-Dist: opentelemetry-instrumentation-openai (>=0.35.0) ; extra == "all"
78
79
  Requires-Dist: opentelemetry-instrumentation-openai (>=0.35.0) ; extra == "openai"
79
- Requires-Dist: opentelemetry-instrumentation-openai ; extra == "all"
80
+ Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.35.0) ; extra == "all"
80
81
  Requires-Dist: opentelemetry-instrumentation-pinecone (>=0.35.0) ; extra == "pinecone"
81
- Requires-Dist: opentelemetry-instrumentation-pinecone ; extra == "all"
82
+ Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.35.0) ; extra == "all"
82
83
  Requires-Dist: opentelemetry-instrumentation-qdrant (>=0.35.0) ; extra == "qdrant"
83
- Requires-Dist: opentelemetry-instrumentation-qdrant ; extra == "all"
84
+ Requires-Dist: opentelemetry-instrumentation-replicate (>=0.35.0) ; extra == "all"
84
85
  Requires-Dist: opentelemetry-instrumentation-replicate (>=0.35.0) ; extra == "replicate"
85
- Requires-Dist: opentelemetry-instrumentation-replicate ; extra == "all"
86
86
  Requires-Dist: opentelemetry-instrumentation-requests (>=0.50b0)
87
+ Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.35.0) ; extra == "all"
87
88
  Requires-Dist: opentelemetry-instrumentation-sagemaker (>=0.35.0) ; extra == "sagemaker"
88
- Requires-Dist: opentelemetry-instrumentation-sagemaker ; extra == "all"
89
89
  Requires-Dist: opentelemetry-instrumentation-sqlalchemy (>=0.50b0)
90
90
  Requires-Dist: opentelemetry-instrumentation-threading (>=0.50b0)
91
+ Requires-Dist: opentelemetry-instrumentation-together (>=0.35.0) ; extra == "all"
91
92
  Requires-Dist: opentelemetry-instrumentation-together (>=0.35.0) ; extra == "together"
92
- Requires-Dist: opentelemetry-instrumentation-together ; extra == "all"
93
+ Requires-Dist: opentelemetry-instrumentation-transformers (>=0.35.0) ; extra == "all"
93
94
  Requires-Dist: opentelemetry-instrumentation-transformers (>=0.35.0) ; extra == "transformers"
94
- Requires-Dist: opentelemetry-instrumentation-transformers ; extra == "all"
95
95
  Requires-Dist: opentelemetry-instrumentation-urllib3 (>=0.50b0)
96
+ Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.35.0) ; extra == "all"
96
97
  Requires-Dist: opentelemetry-instrumentation-vertexai (>=0.35.0) ; extra == "vertexai"
97
- Requires-Dist: opentelemetry-instrumentation-vertexai ; extra == "all"
98
+ Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.35.0) ; extra == "all"
98
99
  Requires-Dist: opentelemetry-instrumentation-watsonx (>=0.35.0) ; extra == "watsonx"
99
- Requires-Dist: opentelemetry-instrumentation-watsonx ; extra == "all"
100
+ Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.35.0) ; extra == "all"
100
101
  Requires-Dist: opentelemetry-instrumentation-weaviate (>=0.35.0) ; extra == "weaviate"
101
- Requires-Dist: opentelemetry-instrumentation-weaviate ; extra == "all"
102
102
  Requires-Dist: opentelemetry-sdk (>=1.28.0)
103
103
  Requires-Dist: opentelemetry-semantic-conventions-ai (>=0.4.2)
104
- Requires-Dist: poetry-core (>=2.0.0)
105
- Requires-Dist: pydantic (>=2.7)
104
+ Requires-Dist: pydantic (>=2.0.3)
106
105
  Requires-Dist: python-dotenv (>=1.0)
107
106
  Requires-Dist: requests (>=2.0)
108
107
  Requires-Dist: tenacity (>=8.0)
@@ -11,7 +11,7 @@ lmnr/openllmetry_sdk/tracing/__init__.py,sha256=xT73L1t2si2CM6QmMiTZ7zn-dKKYBLNr
11
11
  lmnr/openllmetry_sdk/tracing/attributes.py,sha256=B_4KVYWAUu-6DQmsm2eCJQcTxm8pG1EByCBK3uOPkuI,1293
12
12
  lmnr/openllmetry_sdk/tracing/content_allow_list.py,sha256=3feztm6PBWNelc8pAZUcQyEGyeSpNiVKjOaDk65l2ps,846
13
13
  lmnr/openllmetry_sdk/tracing/context_manager.py,sha256=rdSus-p-TaevQ8hIAhfbnZr5dTqRvACDkzXGDpflncY,306
14
- lmnr/openllmetry_sdk/tracing/tracing.py,sha256=5Ctw4-Nn1LMfE4ZTxxOv2sFXFlrBwPTywpOmEpgksXk,32355
14
+ lmnr/openllmetry_sdk/tracing/tracing.py,sha256=N5EeK4yoSa11CPh4J0OvHnDy8uxx018lzJ0FQLVapQ4,32360
15
15
  lmnr/openllmetry_sdk/utils/__init__.py,sha256=pNhf0G3vTd5ccoc03i1MXDbricSaiqCbi1DLWhSekK8,604
16
16
  lmnr/openllmetry_sdk/utils/in_memory_span_exporter.py,sha256=H_4TRaThMO1H6vUQ0OpQvzJk_fZH0OOsRAM1iZQXsR8,2112
17
17
  lmnr/openllmetry_sdk/utils/json_encoder.py,sha256=dK6b_axr70IYL7Vv-bu4wntvDDuyntoqsHaddqX7P58,463
@@ -22,12 +22,12 @@ lmnr/sdk/datasets.py,sha256=hJcQcwTJbtA4COoVG3god4xll9TBSDMfvrhKmMfanjg,1567
22
22
  lmnr/sdk/decorators.py,sha256=ja2EUWUWvFOp28ER0k78PRuxNahwCVyH0TdM3U-xY7U,1856
23
23
  lmnr/sdk/eval_control.py,sha256=G6Fg3Xx_KWv72iBaWlNMdyRTF2bZFQnwJ68sJNSpIcY,177
24
24
  lmnr/sdk/evaluations.py,sha256=lSXSvvYNB5JsSGli_wV-W34LVzJkQOiK8DnvHv4eU5A,16323
25
- lmnr/sdk/laminar.py,sha256=2uoBmM0qn7RheP-avMjAqeLoGsYf4xju_FgIffJqYX8,30966
25
+ lmnr/sdk/laminar.py,sha256=611MLSJwGxVHd7LgW0kPCtwPB2rLlHE_BtVyVrIKFz0,31447
26
26
  lmnr/sdk/log.py,sha256=nt_YMmPw1IRbGy0b7q4rTtP4Yo3pQfNxqJPXK3nDSNQ,2213
27
27
  lmnr/sdk/types.py,sha256=FCNoFoa0ingOvpXGfbiETVsakYyq9Zpoc56MXJ1YDzQ,6390
28
28
  lmnr/sdk/utils.py,sha256=Uk8y15x-sd5tP2ERONahElLDJVEy_3dA_1_5g9A6auY,3358
29
- lmnr-0.4.51b0.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
30
- lmnr-0.4.51b0.dist-info/METADATA,sha256=dlNqYgUwhCDFpm28U2nf-vG_zVruYUMWG9dq72_UsMY,13591
31
- lmnr-0.4.51b0.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
32
- lmnr-0.4.51b0.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
33
- lmnr-0.4.51b0.dist-info/RECORD,,
29
+ lmnr-0.4.53.dist-info/LICENSE,sha256=67b_wJHVV1CBaWkrKFWU1wyqTPSdzH77Ls-59631COg,10411
30
+ lmnr-0.4.53.dist-info/METADATA,sha256=ofVN_aE0f0cERwkkSlr4hKaeCI3tD8iTK3G3coZas1Q,13829
31
+ lmnr-0.4.53.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
32
+ lmnr-0.4.53.dist-info/entry_points.txt,sha256=K1jE20ww4jzHNZLnsfWBvU3YKDGBgbOiYG5Y7ivQcq4,37
33
+ lmnr-0.4.53.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.0.0
2
+ Generator: poetry-core 2.0.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any