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,61 +0,0 @@
1
- # Copyright The OpenTelemetry Authors
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- import threading
16
- import typing
17
-
18
- from opentelemetry.sdk.trace import ReadableSpan
19
- from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
20
-
21
-
22
- class InMemorySpanExporter(SpanExporter):
23
- """Implementation of :class:`.SpanExporter` that stores spans in memory.
24
-
25
- This class can be used for testing purposes. It stores the exported spans
26
- in a list in memory that can be retrieved using the
27
- :func:`.get_finished_spans` method.
28
- """
29
-
30
- def __init__(self) -> None:
31
- self._finished_spans: typing.List[ReadableSpan] = []
32
- self._stopped = False
33
- self._lock = threading.Lock()
34
-
35
- def clear(self) -> None:
36
- """Clear list of collected spans."""
37
- with self._lock:
38
- self._finished_spans.clear()
39
-
40
- def get_finished_spans(self) -> typing.Tuple[ReadableSpan, ...]:
41
- """Get list of collected spans."""
42
- with self._lock:
43
- return tuple(self._finished_spans)
44
-
45
- def export(self, spans: typing.Sequence[ReadableSpan]) -> SpanExportResult:
46
- """Stores a list of spans in memory."""
47
- if self._stopped:
48
- return SpanExportResult.FAILURE
49
- with self._lock:
50
- self._finished_spans.extend(spans)
51
- return SpanExportResult.SUCCESS
52
-
53
- def shutdown(self) -> None:
54
- """Shut downs the exporter.
55
-
56
- Calls to export after the exporter has been shut down will fail.
57
- """
58
- self._stopped = True
59
-
60
- def force_flush(self, timeout_millis: int = 30000) -> bool:
61
- return True
File without changes
File without changes