hexkit 5.2.0__tar.gz → 5.3.0__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.
- {hexkit-5.2.0/src/hexkit.egg-info → hexkit-5.3.0}/PKG-INFO +1 -1
- {hexkit-5.2.0 → hexkit-5.3.0}/pyproject.toml +4 -1
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/opentelemetry.py +15 -2
- {hexkit-5.2.0 → hexkit-5.3.0/src/hexkit.egg-info}/PKG-INFO +1 -1
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit.egg-info/SOURCES.txt +1 -0
- hexkit-5.3.0/src/hexkit.egg-info/entry_points.txt +2 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/LICENSE +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/MANIFEST.in +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/README.md +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/setup.cfg +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/__main__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/base.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/config.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/correlation.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/custom_types.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/log.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/protocols/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/protocols/dao.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/protocols/daopub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/protocols/daosub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/protocols/eventpub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/protocols/eventsub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/protocols/objstorage.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/config.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/provider/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/provider/daosub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/provider/eventpub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/provider/eventsub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/provider/utils.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/testcontainer.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/akafka/testutils.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongodb/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongodb/migrations/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongodb/migrations/_manager.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongodb/migrations/_utils.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongodb/provider.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongodb/testutils.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongokafka/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongokafka/provider/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongokafka/provider/config.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongokafka/provider/daopub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongokafka/provider/persistent_pub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/mongokafka/testutils.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/provider.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/test_files/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/test_files/test_file1.yaml +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/test_files/test_file2.yaml +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/test_files/test_file3.yaml +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/test_files/test_file4.yaml +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/testutils/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/testutils/_fixtures.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/testutils/_typical_workflow.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/s3/testutils/_utils.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/testing/__init__.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/providers/testing/eventpub.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/py.typed +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit/utils.py +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit.egg-info/dependency_links.txt +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit.egg-info/requires.txt +0 -0
- {hexkit-5.2.0 → hexkit-5.3.0}/src/hexkit.egg-info/top_level.txt +0 -0
|
@@ -24,7 +24,7 @@ classifiers = [
|
|
|
24
24
|
"Intended Audience :: Developers",
|
|
25
25
|
]
|
|
26
26
|
name = "hexkit"
|
|
27
|
-
version = "5.
|
|
27
|
+
version = "5.3.0"
|
|
28
28
|
description = "A Toolkit for Building Microservices using the Hexagonal Architecture"
|
|
29
29
|
dependencies = [
|
|
30
30
|
"opentelemetry-api >=1.31.1, <2",
|
|
@@ -102,6 +102,9 @@ all = [
|
|
|
102
102
|
[project.urls]
|
|
103
103
|
Repository = "https://github.com/ghga-de/hexkit"
|
|
104
104
|
|
|
105
|
+
[project.entry-points.opentelemetry_distro]
|
|
106
|
+
hexkit_distro = "hexkit.opentelemetry:HexkitDistro"
|
|
107
|
+
|
|
105
108
|
[tool.setuptools.packages.find]
|
|
106
109
|
where = [
|
|
107
110
|
"src",
|
|
@@ -25,6 +25,9 @@ from opentelemetry.environment_variables import (
|
|
|
25
25
|
OTEL_TRACES_EXPORTER,
|
|
26
26
|
)
|
|
27
27
|
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
|
28
|
+
from opentelemetry.instrumentation.distro import ( # type: ignore[attr-defined]
|
|
29
|
+
BaseDistro,
|
|
30
|
+
)
|
|
28
31
|
from opentelemetry.sdk.environment_variables import (
|
|
29
32
|
OTEL_EXPORTER_OTLP_ENDPOINT,
|
|
30
33
|
OTEL_EXPORTER_OTLP_PROTOCOL,
|
|
@@ -95,6 +98,16 @@ class OpenTelemetryConfig(BaseSettings):
|
|
|
95
98
|
)
|
|
96
99
|
|
|
97
100
|
|
|
101
|
+
class HexkitDistro(BaseDistro):
|
|
102
|
+
"""
|
|
103
|
+
Custom OpenTelemetry Distro configuring a default set of configuration
|
|
104
|
+
based on a config file.
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
def _configure(self, **kwargs):
|
|
108
|
+
"""Custom DefaultDistro iplementation to provide autoinstrumentation entry points."""
|
|
109
|
+
|
|
110
|
+
|
|
98
111
|
def configure_opentelemetry(*, service_name: str, config: OpenTelemetryConfig):
|
|
99
112
|
"""Configure all needed parts of OpenTelemetry.
|
|
100
113
|
|
|
@@ -143,8 +156,8 @@ def configure_opentelemetry(*, service_name: str, config: OpenTelemetryConfig):
|
|
|
143
156
|
|
|
144
157
|
def start_span(
|
|
145
158
|
*,
|
|
146
|
-
record_exception: bool =
|
|
147
|
-
set_status_on_exception: bool =
|
|
159
|
+
record_exception: bool = True,
|
|
160
|
+
set_status_on_exception: bool = True,
|
|
148
161
|
) -> Callable:
|
|
149
162
|
"""Returns decorated or undecorated function depending on if TRACER is instantiated.
|
|
150
163
|
|
|
@@ -15,6 +15,7 @@ src/hexkit/utils.py
|
|
|
15
15
|
src/hexkit.egg-info/PKG-INFO
|
|
16
16
|
src/hexkit.egg-info/SOURCES.txt
|
|
17
17
|
src/hexkit.egg-info/dependency_links.txt
|
|
18
|
+
src/hexkit.egg-info/entry_points.txt
|
|
18
19
|
src/hexkit.egg-info/requires.txt
|
|
19
20
|
src/hexkit.egg-info/top_level.txt
|
|
20
21
|
src/hexkit/protocols/__init__.py
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|