mpt-extension-sdk 5.4.1__py3-none-any.whl → 5.4.3__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.
@@ -33,7 +33,7 @@ def django(ctx, management_args): # pragma: no cover
33
33
  if settings.USE_APPLICATIONINSIGHTS:
34
34
  tracer = trace.get_tracer(__name__)
35
35
  tracer_context = tracer.start_as_current_span(
36
- f"Running Django command {management_args[0]}",
36
+ f"Running Django command {management_args}",
37
37
  )
38
38
  else:
39
39
  tracer_context = nullcontext()
@@ -77,7 +77,7 @@ class OrderEventProducer(EventProducer):
77
77
  orders = []
78
78
  rql_query = RQLQuery().agreement.product.id.in_(
79
79
  settings.MPT_PRODUCTS_IDS
80
- ) and RQLQuery(status="processing")
80
+ ) & RQLQuery(status="processing")
81
81
  url = (
82
82
  f"/commerce/orders?{rql_query}&select=audit,parameters,lines,subscriptions,"
83
83
  f"subscriptions.lines,agreement,buyer,seller&order=audit.created.at"
@@ -0,0 +1,18 @@
1
+ from functools import wraps
2
+
3
+ from opentelemetry import trace
4
+
5
+ tracer = trace.get_tracer(__name__)
6
+
7
+
8
+ def dynamic_trace_span(name_fn):
9
+ def decorator(func):
10
+ @wraps(func)
11
+ def wrapper(*args, **kwargs):
12
+ span_name = name_fn(*args, **kwargs)
13
+ with tracer.start_as_current_span(span_name):
14
+ return func(*args, **kwargs)
15
+
16
+ return wrapper
17
+
18
+ return decorator
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mpt-extension-sdk
3
- Version: 5.4.1
3
+ Version: 5.4.3
4
4
  Summary: Extensions SDK for SoftwareONE Marketplace Platform
5
5
  Author: SoftwareOne AG
6
6
  License: Apache-2.0 license
@@ -24,10 +24,11 @@ mpt_extension_sdk/runtime/initializer.py,sha256=V8fubCULUJlvCBkYhJM52GUNoHNWVI-s
24
24
  mpt_extension_sdk/runtime/logging.py,sha256=wJ6KyvnuvMZELI1Hd0fYbuHr7YiP3GIXFBvvSdmd7nQ,885
25
25
  mpt_extension_sdk/runtime/master.py,sha256=slwZor9IhIVzQBxbUrLNKmHDmnfl9JVA4FMY1nqm0w8,4575
26
26
  mpt_extension_sdk/runtime/swoext.py,sha256=jtqAOASJzf66FkXGcUS1iOx-bN5hCv3pFVQfJGd3Abc,1664
27
+ mpt_extension_sdk/runtime/tracer.py,sha256=Mvt1BKBdSvb4FlOcjUDhIKEXmiYETrFGgHdhOQwEr7g,415
27
28
  mpt_extension_sdk/runtime/utils.py,sha256=I4nhj89LDwGG5ukX5K66RqvKv6lo1drUaa3VbaJtZtA,3781
28
29
  mpt_extension_sdk/runtime/workers.py,sha256=oAMpRDbSdHkgX_UI2Vm1spOJoxQVehK7RFKPcZowAh4,2643
29
30
  mpt_extension_sdk/runtime/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- mpt_extension_sdk/runtime/commands/django.py,sha256=d8GJmwxYxqPKZVgEFmh_372KqqSPNoHbETlG-RGxpVo,1217
31
+ mpt_extension_sdk/runtime/commands/django.py,sha256=Vt5qHR03HhGFeuja9xrHWOZ5TMsV7RC0qUwB7z7ptyQ,1214
31
32
  mpt_extension_sdk/runtime/commands/run.py,sha256=Vj2EV9TuE2VvuLrBBS-ppfp71Kd2z15zdkO4h86twH4,1139
32
33
  mpt_extension_sdk/runtime/djapp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
34
  mpt_extension_sdk/runtime/djapp/apps.py,sha256=YA1G5HaRqFBS-0DfYQuFpMgzUCYpu5T8x5LEC6MwI_M,1398
@@ -40,13 +41,13 @@ mpt_extension_sdk/runtime/djapp/management/commands/__init__.py,sha256=47DEQpj8H
40
41
  mpt_extension_sdk/runtime/djapp/management/commands/consume_events.py,sha256=BVb4sgKI2Ep759bDcOH5Qm1xJEewc5-bNt_snspV2ck,1229
41
42
  mpt_extension_sdk/runtime/events/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
43
  mpt_extension_sdk/runtime/events/dispatcher.py,sha256=ZMswk50vGGfUgKeQ2Cc3k9wtrm63z0OH7EtlKCkWQYM,3008
43
- mpt_extension_sdk/runtime/events/producers.py,sha256=amTUJxTYkePNMQEZ6yP9iCN_0Wk2dpGNl32kBwJS5qE,3654
44
+ mpt_extension_sdk/runtime/events/producers.py,sha256=ErYgU7bY2EmmiLh1lX5AJbBpdkQkieB7GjQvYbpYLjI,3652
44
45
  mpt_extension_sdk/runtime/events/utils.py,sha256=bxFo-iQUqEJDqcIotC88Ty3Xt0K2FyYjA9UMWFEyMKI,2663
45
46
  mpt_extension_sdk/swo_rql/__init__.py,sha256=QrvRDYhpK-Pd3OF-U2aMeazuKm_kbvXwLRIjd9Mm6ok,104
46
47
  mpt_extension_sdk/swo_rql/constants.py,sha256=39BZ78OzdU_dIQtoy-Z_5utXqEXRweIFvM9Zfxg9j5M,171
47
48
  mpt_extension_sdk/swo_rql/query_builder.py,sha256=xTdPGkI9MzCJyg-oOkK0z2oHFNjhEe8ihR-OmDL-kto,10500
48
- mpt_extension_sdk-5.4.1.dist-info/METADATA,sha256=4IkB2m9FTGBbOKwr_2VffvJMdL8GEIIubkpJ-WNGQw8,1358
49
- mpt_extension_sdk-5.4.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
- mpt_extension_sdk-5.4.1.dist-info/entry_points.txt,sha256=N8T9gBssEOm_UeBf9ABbGqtlnethrumfMoL4hNYWVFA,146
51
- mpt_extension_sdk-5.4.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
52
- mpt_extension_sdk-5.4.1.dist-info/RECORD,,
49
+ mpt_extension_sdk-5.4.3.dist-info/METADATA,sha256=U50CwRo0GSg5SyaH32ZThwTgdeaD8vrv3DdPpccp9iA,1358
50
+ mpt_extension_sdk-5.4.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
51
+ mpt_extension_sdk-5.4.3.dist-info/entry_points.txt,sha256=N8T9gBssEOm_UeBf9ABbGqtlnethrumfMoL4hNYWVFA,146
52
+ mpt_extension_sdk-5.4.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
53
+ mpt_extension_sdk-5.4.3.dist-info/RECORD,,