lmnr 0.5.3__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 +6 -1
- lmnr/opentelemetry_lib/__init__.py +16 -36
- lmnr/opentelemetry_lib/decorators/__init__.py +219 -0
- lmnr/opentelemetry_lib/tracing/__init__.py +139 -1
- lmnr/opentelemetry_lib/tracing/_instrument_initializers.py +398 -0
- lmnr/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/opentelemetry_lib/tracing/{context_manager.py → tracer.py} +6 -1
- lmnr/opentelemetry_lib/utils/package_check.py +3 -1
- lmnr/sdk/browser/browser_use_otel.py +1 -1
- lmnr/sdk/browser/pw_utils.py +8 -4
- lmnr/sdk/client/asynchronous/resources/agent.py +3 -1
- lmnr/sdk/client/synchronous/resources/agent.py +3 -1
- lmnr/sdk/decorators.py +4 -2
- lmnr/sdk/evaluations.py +3 -3
- lmnr/sdk/laminar.py +13 -31
- lmnr/sdk/utils.py +2 -3
- lmnr/version.py +1 -1
- {lmnr-0.5.3.dist-info → lmnr-0.6.0.dist-info}/METADATA +64 -62
- {lmnr-0.5.3.dist-info → lmnr-0.6.0.dist-info}/RECORD +26 -27
- lmnr/opentelemetry_lib/config/__init__.py +0 -12
- lmnr/opentelemetry_lib/decorators/base.py +0 -210
- lmnr/opentelemetry_lib/instruments.py +0 -42
- lmnr/opentelemetry_lib/tracing/content_allow_list.py +0 -24
- lmnr/opentelemetry_lib/tracing/tracing.py +0 -1016
- lmnr/opentelemetry_lib/utils/in_memory_span_exporter.py +0 -61
- {lmnr-0.5.3.dist-info → lmnr-0.6.0.dist-info}/LICENSE +0 -0
- {lmnr-0.5.3.dist-info → lmnr-0.6.0.dist-info}/WHEEL +0 -0
- {lmnr-0.5.3.dist-info → lmnr-0.6.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,96 @@
|
|
1
|
+
import uuid
|
2
|
+
|
3
|
+
from typing import Optional, Union
|
4
|
+
from opentelemetry.sdk.trace.export import (
|
5
|
+
SpanProcessor,
|
6
|
+
SpanExporter,
|
7
|
+
BatchSpanProcessor,
|
8
|
+
SimpleSpanProcessor,
|
9
|
+
)
|
10
|
+
from opentelemetry.trace import Span
|
11
|
+
from opentelemetry.context import Context, get_value, get_current, set_value
|
12
|
+
|
13
|
+
from lmnr.opentelemetry_lib.tracing.attributes import (
|
14
|
+
SPAN_IDS_PATH,
|
15
|
+
SPAN_INSTRUMENTATION_SOURCE,
|
16
|
+
SPAN_LANGUAGE_VERSION,
|
17
|
+
SPAN_PATH,
|
18
|
+
SPAN_SDK_VERSION,
|
19
|
+
)
|
20
|
+
from lmnr.opentelemetry_lib.tracing.exporter import LaminarSpanExporter
|
21
|
+
from lmnr.opentelemetry_lib.tracing.context_properties import (
|
22
|
+
_set_association_properties_attributes,
|
23
|
+
)
|
24
|
+
from lmnr.version import PYTHON_VERSION, __version__
|
25
|
+
|
26
|
+
|
27
|
+
class LaminarSpanProcessor(SpanProcessor):
|
28
|
+
instance: Union[BatchSpanProcessor, SimpleSpanProcessor]
|
29
|
+
__span_id_to_path: dict[int, list[str]] = {}
|
30
|
+
__span_id_lists: dict[int, list[str]] = {}
|
31
|
+
|
32
|
+
def __init__(
|
33
|
+
self,
|
34
|
+
base_url: Optional[str] = None,
|
35
|
+
port: Optional[int] = None,
|
36
|
+
api_key: Optional[str] = None,
|
37
|
+
timeout_seconds: int = 30,
|
38
|
+
force_http: bool = False,
|
39
|
+
max_export_batch_size: int = 512,
|
40
|
+
disable_batch: bool = False,
|
41
|
+
exporter: Optional[SpanExporter] = None,
|
42
|
+
):
|
43
|
+
self.exporter = exporter or LaminarSpanExporter(
|
44
|
+
base_url=base_url,
|
45
|
+
port=port,
|
46
|
+
api_key=api_key,
|
47
|
+
timeout_seconds=timeout_seconds,
|
48
|
+
force_http=force_http,
|
49
|
+
)
|
50
|
+
self.instance = (
|
51
|
+
SimpleSpanProcessor(self.exporter)
|
52
|
+
if disable_batch
|
53
|
+
else BatchSpanProcessor(
|
54
|
+
self.exporter, max_export_batch_size=max_export_batch_size
|
55
|
+
)
|
56
|
+
)
|
57
|
+
|
58
|
+
def on_start(self, span: Span, parent_context: Optional[Context] = None):
|
59
|
+
span_path_in_context = get_value("span_path", parent_context or get_current())
|
60
|
+
parent_span_path = span_path_in_context or (
|
61
|
+
self.__span_id_to_path.get(span.parent.span_id) if span.parent else None
|
62
|
+
)
|
63
|
+
parent_span_ids_path = (
|
64
|
+
self.__span_id_lists.get(span.parent.span_id, []) if span.parent else []
|
65
|
+
)
|
66
|
+
span_path = parent_span_path + [span.name] if parent_span_path else [span.name]
|
67
|
+
span_ids_path = parent_span_ids_path + [
|
68
|
+
str(uuid.UUID(int=span.get_span_context().span_id))
|
69
|
+
]
|
70
|
+
span.set_attribute(SPAN_PATH, span_path)
|
71
|
+
span.set_attribute(SPAN_IDS_PATH, span_ids_path)
|
72
|
+
set_value("span_path", span_path, get_current())
|
73
|
+
self.__span_id_to_path[span.get_span_context().span_id] = span_path
|
74
|
+
self.__span_id_lists[span.get_span_context().span_id] = span_ids_path
|
75
|
+
|
76
|
+
span.set_attribute(SPAN_INSTRUMENTATION_SOURCE, "python")
|
77
|
+
span.set_attribute(SPAN_SDK_VERSION, __version__)
|
78
|
+
span.set_attribute(SPAN_LANGUAGE_VERSION, f"python@{PYTHON_VERSION}")
|
79
|
+
|
80
|
+
association_properties = get_value("association_properties")
|
81
|
+
if association_properties is not None:
|
82
|
+
_set_association_properties_attributes(span, association_properties)
|
83
|
+
self.instance.on_start(span, parent_context)
|
84
|
+
|
85
|
+
def on_end(self, span: Span):
|
86
|
+
self.instance.on_end(span)
|
87
|
+
|
88
|
+
def force_flush(self, timeout_millis: int = 30000) -> bool:
|
89
|
+
return self.instance.force_flush(timeout_millis)
|
90
|
+
|
91
|
+
def shutdown(self):
|
92
|
+
self.instance.shutdown()
|
93
|
+
|
94
|
+
def clear(self):
|
95
|
+
self.__span_id_to_path = {}
|
96
|
+
self.__span_id_lists = {}
|
@@ -1,6 +1,11 @@
|
|
1
1
|
from contextlib import contextmanager
|
2
2
|
|
3
|
-
from
|
3
|
+
from opentelemetry import trace
|
4
|
+
from lmnr.opentelemetry_lib.tracing import TracerWrapper
|
5
|
+
|
6
|
+
|
7
|
+
def get_laminar_tracer_provider() -> trace.TracerProvider:
|
8
|
+
return TracerWrapper.instance.__tracer_provider or trace.get_tracer_provider()
|
4
9
|
|
5
10
|
|
6
11
|
@contextmanager
|
@@ -1,6 +1,8 @@
|
|
1
1
|
from importlib.metadata import distributions
|
2
2
|
|
3
|
-
installed_packages = {
|
3
|
+
installed_packages = {
|
4
|
+
(dist.name or dist.metadata.get("Name", "")).lower() for dist in distributions()
|
5
|
+
}
|
4
6
|
|
5
7
|
|
6
8
|
def is_package_installed(package_name: str) -> bool:
|
lmnr/sdk/browser/pw_utils.py
CHANGED
@@ -100,14 +100,16 @@ async def send_events_async(
|
|
100
100
|
"""Fetch events from the page and send them to the server"""
|
101
101
|
try:
|
102
102
|
# Check if function exists first
|
103
|
-
events = await page.evaluate(
|
103
|
+
events = await page.evaluate(
|
104
|
+
"""
|
104
105
|
() => {
|
105
106
|
if (!window.lmnrPageIsFocused || typeof window.lmnrGetAndClearEvents !== 'function') {
|
106
107
|
return [];
|
107
108
|
}
|
108
109
|
return window.lmnrGetAndClearEvents();
|
109
110
|
}
|
110
|
-
"""
|
111
|
+
"""
|
112
|
+
)
|
111
113
|
|
112
114
|
if not events or len(events) == 0:
|
113
115
|
return
|
@@ -127,14 +129,16 @@ def send_events_sync(
|
|
127
129
|
):
|
128
130
|
"""Synchronous version of send_events"""
|
129
131
|
try:
|
130
|
-
events = page.evaluate(
|
132
|
+
events = page.evaluate(
|
133
|
+
"""
|
131
134
|
() => {
|
132
135
|
if (!window.lmnrPageIsFocused || typeof window.lmnrGetAndClearEvents !== 'function') {
|
133
136
|
return [];
|
134
137
|
}
|
135
138
|
return window.lmnrGetAndClearEvents();
|
136
139
|
}
|
137
|
-
"""
|
140
|
+
"""
|
141
|
+
)
|
138
142
|
if not events or len(events) == 0:
|
139
143
|
return
|
140
144
|
|
@@ -278,6 +278,8 @@ class AsyncAgent(BaseAsyncResource):
|
|
278
278
|
json=request.model_dump(by_alias=True),
|
279
279
|
headers=self._headers(),
|
280
280
|
) as response:
|
281
|
+
if response.status_code != 200:
|
282
|
+
raise RuntimeError(await response.read())
|
281
283
|
async for line in response.aiter_lines():
|
282
284
|
line = str(line)
|
283
285
|
if line.startswith("[DONE]"):
|
@@ -288,7 +290,7 @@ class AsyncAgent(BaseAsyncResource):
|
|
288
290
|
if line:
|
289
291
|
chunk = RunAgentResponseChunk.model_validate_json(line)
|
290
292
|
yield chunk.root
|
291
|
-
if chunk.root.chunk_type in ["finalOutput", "error"]:
|
293
|
+
if chunk.root.chunk_type in ["finalOutput", "error", "timeout"]:
|
292
294
|
break
|
293
295
|
|
294
296
|
async def __run_non_streaming(self, request: RunAgentRequest) -> AgentOutput:
|
@@ -270,6 +270,8 @@ class Agent(BaseResource):
|
|
270
270
|
json=request.model_dump(by_alias=True),
|
271
271
|
headers=self._headers(),
|
272
272
|
) as response:
|
273
|
+
if response.status_code != 200:
|
274
|
+
raise RuntimeError(response.read())
|
273
275
|
for line in response.iter_lines():
|
274
276
|
line = str(line)
|
275
277
|
if line.startswith("[DONE]"):
|
@@ -280,7 +282,7 @@ class Agent(BaseResource):
|
|
280
282
|
if line:
|
281
283
|
chunk = RunAgentResponseChunk.model_validate_json(line)
|
282
284
|
yield chunk.root
|
283
|
-
if chunk.root.chunk_type in ["finalOutput", "error"]:
|
285
|
+
if chunk.root.chunk_type in ["finalOutput", "error", "timeout"]:
|
284
286
|
break
|
285
287
|
|
286
288
|
def __run_non_streaming(self, request: RunAgentRequest) -> AgentOutput:
|
lmnr/sdk/decorators.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from lmnr.opentelemetry_lib.decorators
|
1
|
+
from lmnr.opentelemetry_lib.decorators import (
|
2
2
|
entity_method,
|
3
3
|
aentity_method,
|
4
4
|
)
|
@@ -8,7 +8,9 @@ from typing import Callable, Literal, Optional, TypeVar, Union, cast
|
|
8
8
|
from typing_extensions import ParamSpec
|
9
9
|
|
10
10
|
from lmnr.opentelemetry_lib.tracing.attributes import SESSION_ID
|
11
|
-
from lmnr.opentelemetry_lib.tracing.
|
11
|
+
from lmnr.opentelemetry_lib.tracing.context_properties import (
|
12
|
+
update_association_properties,
|
13
|
+
)
|
12
14
|
|
13
15
|
from .utils import is_async
|
14
16
|
|
lmnr/sdk/evaluations.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import asyncio
|
2
2
|
import re
|
3
3
|
import uuid
|
4
|
-
|
4
|
+
|
5
5
|
from tqdm import tqdm
|
6
6
|
from typing import Any, Awaitable, Optional, Set, Union
|
7
7
|
|
8
|
-
from lmnr.opentelemetry_lib.instruments import Instruments
|
8
|
+
from lmnr.opentelemetry_lib.tracing.instruments import Instruments
|
9
9
|
from lmnr.opentelemetry_lib.tracing.attributes import SPAN_TYPE
|
10
10
|
|
11
11
|
from lmnr.sdk.client.asynchronous.async_client import AsyncLaminarClient
|
@@ -111,7 +111,7 @@ class Evaluation:
|
|
111
111
|
trace_export_timeout_seconds: Optional[int] = None,
|
112
112
|
):
|
113
113
|
"""
|
114
|
-
Initializes an instance of the
|
114
|
+
Initializes an instance of the Evaluation class.
|
115
115
|
|
116
116
|
Parameters:
|
117
117
|
data (Union[List[EvaluationDatapoint|dict], EvaluationDataset]):\
|
lmnr/sdk/laminar.py
CHANGED
@@ -1,21 +1,17 @@
|
|
1
1
|
from contextlib import contextmanager
|
2
2
|
from contextvars import Context
|
3
3
|
from lmnr.opentelemetry_lib import TracerManager
|
4
|
-
from lmnr.opentelemetry_lib.instruments import Instruments
|
5
|
-
from lmnr.opentelemetry_lib.tracing import get_tracer
|
4
|
+
from lmnr.opentelemetry_lib.tracing.instruments import Instruments
|
5
|
+
from lmnr.opentelemetry_lib.tracing.tracer import get_tracer
|
6
6
|
from lmnr.opentelemetry_lib.tracing.attributes import (
|
7
7
|
ASSOCIATION_PROPERTIES,
|
8
8
|
Attributes,
|
9
9
|
SPAN_TYPE,
|
10
10
|
)
|
11
|
-
from lmnr.opentelemetry_lib
|
12
|
-
from lmnr.opentelemetry_lib.decorators
|
11
|
+
from lmnr.opentelemetry_lib import MAX_MANUAL_SPAN_PAYLOAD_SIZE
|
12
|
+
from lmnr.opentelemetry_lib.decorators import json_dumps
|
13
13
|
from opentelemetry import context as context_api, trace
|
14
14
|
from opentelemetry.context import attach, detach
|
15
|
-
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import (
|
16
|
-
OTLPSpanExporter,
|
17
|
-
Compression,
|
18
|
-
)
|
19
15
|
from opentelemetry.sdk.trace.id_generator import RandomIdGenerator
|
20
16
|
from opentelemetry.util.types import AttributeValue
|
21
17
|
|
@@ -34,7 +30,7 @@ from lmnr.opentelemetry_lib.tracing.attributes import (
|
|
34
30
|
SPAN_OUTPUT,
|
35
31
|
TRACE_TYPE,
|
36
32
|
)
|
37
|
-
from lmnr.opentelemetry_lib.tracing.
|
33
|
+
from lmnr.opentelemetry_lib.tracing.context_properties import (
|
38
34
|
get_association_properties,
|
39
35
|
remove_association_properties,
|
40
36
|
set_association_properties,
|
@@ -52,8 +48,6 @@ from .types import (
|
|
52
48
|
|
53
49
|
|
54
50
|
class Laminar:
|
55
|
-
__base_http_url: str
|
56
|
-
__base_grpc_url: str
|
57
51
|
__project_api_key: Optional[str] = None
|
58
52
|
__initialized: bool = False
|
59
53
|
|
@@ -116,6 +110,8 @@ class Laminar:
|
|
116
110
|
|
117
111
|
url = base_url or from_env("LMNR_BASE_URL") or "https://api.lmnr.ai"
|
118
112
|
url = url.rstrip("/")
|
113
|
+
if not url.startswith("http"):
|
114
|
+
url = f"https://{url}"
|
119
115
|
if match := re.search(r":(\d{1,5})$", url):
|
120
116
|
url = url[: -len(match.group(0))]
|
121
117
|
if http_port is None:
|
@@ -124,36 +120,22 @@ class Laminar:
|
|
124
120
|
else:
|
125
121
|
cls.__logger.info(f"Using HTTP port passed as an argument: {http_port}")
|
126
122
|
|
127
|
-
cls.__base_http_url = f"{url}:{http_port or 443}"
|
128
|
-
cls.__base_grpc_url = f"{url}:{grpc_port or 8443}"
|
129
|
-
|
130
123
|
cls.__initialized = True
|
124
|
+
|
131
125
|
if not os.getenv("OTEL_ATTRIBUTE_COUNT_LIMIT"):
|
132
126
|
# each message is at least 2 attributes: role and content,
|
133
127
|
# but the default attribute limit is 128, so raise it
|
134
128
|
os.environ["OTEL_ATTRIBUTE_COUNT_LIMIT"] = "10000"
|
135
129
|
|
136
|
-
# if not is_latest_version():
|
137
|
-
# cls.__logger.warning(
|
138
|
-
# "You are using an older version of the Laminar SDK. "
|
139
|
-
# f"Latest version: {get_latest_pypi_version()}, current version: {SDK_VERSION}.\n"
|
140
|
-
# "Please update to the latest version by running "
|
141
|
-
# "`pip install --upgrade lmnr`."
|
142
|
-
# )
|
143
|
-
|
144
130
|
TracerManager.init(
|
145
|
-
|
131
|
+
base_url=url,
|
132
|
+
http_port=http_port or 443,
|
133
|
+
port=grpc_port or 8443,
|
146
134
|
project_api_key=cls.__project_api_key,
|
147
|
-
exporter=OTLPSpanExporter(
|
148
|
-
endpoint=cls.__base_grpc_url,
|
149
|
-
headers={"authorization": f"Bearer {cls.__project_api_key}"},
|
150
|
-
compression=Compression.Gzip,
|
151
|
-
# default timeout is 10 seconds, increase it to 30 seconds
|
152
|
-
timeout=export_timeout_seconds or 30,
|
153
|
-
),
|
154
135
|
instruments=instruments,
|
155
136
|
disable_batch=disable_batch,
|
156
137
|
max_export_batch_size=max_export_batch_size,
|
138
|
+
timeout_seconds=export_timeout_seconds,
|
157
139
|
)
|
158
140
|
|
159
141
|
@classmethod
|
@@ -680,7 +662,7 @@ class Laminar:
|
|
680
662
|
"""Set the metadata for the current trace.
|
681
663
|
|
682
664
|
Args:
|
683
|
-
metadata (dict[str, str]): Metadata to set for the trace.
|
665
|
+
metadata (dict[str, str]): Metadata to set for the trace. Will be\
|
684
666
|
sent as attributes, so must be json serializable.
|
685
667
|
"""
|
686
668
|
props = {f"metadata.{k}": json_dumps(v) for k, v in metadata.items()}
|
lmnr/sdk/utils.py
CHANGED
@@ -37,10 +37,9 @@ def is_async(func: typing.Callable) -> bool:
|
|
37
37
|
return True
|
38
38
|
|
39
39
|
# Fallback: check if the function's code object contains 'async'.
|
40
|
-
# This is for cases when a decorator did not properly use
|
40
|
+
# This is for cases when a decorator (not ours) did not properly use
|
41
41
|
# `functools.wraps` or `functools.update_wrapper`
|
42
|
-
|
43
|
-
return (func.__code__.co_flags & CO_COROUTINE) != 0
|
42
|
+
return (func.__code__.co_flags & inspect.CO_COROUTINE) != 0
|
44
43
|
|
45
44
|
|
46
45
|
def is_async_iterator(o: typing.Any) -> bool:
|
lmnr/version.py
CHANGED
@@ -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)
|
@@ -1,55 +1,54 @@
|
|
1
|
-
lmnr/__init__.py,sha256=
|
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=
|
5
|
-
lmnr/opentelemetry_lib/
|
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=ai_eJynFwWWcrJ7yHUHyDfdjJ3q85GFjjp5pnjROLGI,1768
|
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=
|
13
|
-
lmnr/opentelemetry_lib/tracing/
|
14
|
-
lmnr/opentelemetry_lib/tracing/
|
15
|
-
lmnr/opentelemetry_lib/tracing/
|
16
|
-
lmnr/opentelemetry_lib/tracing/
|
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
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=
|
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=
|
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
25
|
lmnr/sdk/browser/playwright_otel.py,sha256=dPmdZo9MeSkPGNG8lUCP9JV1G7pW8MXLWT6xoFVOVUA,12672
|
27
|
-
lmnr/sdk/browser/pw_utils.py,sha256=
|
26
|
+
lmnr/sdk/browser/pw_utils.py,sha256=Tw5kmONwPu9Q7_QHGIa-amotImQugGVFeEyMCUxmDhc,10243
|
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=
|
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=
|
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=
|
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=
|
46
|
-
lmnr/sdk/laminar.py,sha256=
|
44
|
+
lmnr/sdk/evaluations.py,sha256=SMCoYMHGwMKEXaGT6tR10dvXXU_OrazlYZCy11hKlQc,20444
|
45
|
+
lmnr/sdk/laminar.py,sha256=Zh4KCIDCOe7yTdZBbYNPXG_WxURSkzkJOR5wKFjQPj0,27180
|
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=
|
50
|
-
lmnr/version.py,sha256=
|
51
|
-
lmnr-0.
|
52
|
-
lmnr-0.
|
53
|
-
lmnr-0.
|
54
|
-
lmnr-0.
|
55
|
-
lmnr-0.
|
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,,
|
@@ -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
|