hexkit 4.6.2__tar.gz → 5.0.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.
Files changed (63) hide show
  1. {hexkit-4.6.2/src/hexkit.egg-info → hexkit-5.0.0}/PKG-INFO +1 -1
  2. {hexkit-4.6.2 → hexkit-5.0.0}/pyproject.toml +1 -1
  3. hexkit-4.6.2/src/hexkit/opentelemetry_setup.py → hexkit-5.0.0/src/hexkit/opentelemetry.py +8 -14
  4. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/provider/eventsub.py +2 -2
  5. {hexkit-4.6.2 → hexkit-5.0.0/src/hexkit.egg-info}/PKG-INFO +1 -1
  6. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit.egg-info/SOURCES.txt +1 -1
  7. {hexkit-4.6.2 → hexkit-5.0.0}/LICENSE +0 -0
  8. {hexkit-4.6.2 → hexkit-5.0.0}/MANIFEST.in +0 -0
  9. {hexkit-4.6.2 → hexkit-5.0.0}/README.md +0 -0
  10. {hexkit-4.6.2 → hexkit-5.0.0}/setup.cfg +0 -0
  11. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/__init__.py +0 -0
  12. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/__main__.py +0 -0
  13. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/base.py +0 -0
  14. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/config.py +0 -0
  15. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/correlation.py +0 -0
  16. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/custom_types.py +0 -0
  17. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/log.py +0 -0
  18. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/protocols/__init__.py +0 -0
  19. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/protocols/dao.py +0 -0
  20. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/protocols/daopub.py +0 -0
  21. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/protocols/daosub.py +0 -0
  22. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/protocols/eventpub.py +0 -0
  23. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/protocols/eventsub.py +0 -0
  24. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/protocols/objstorage.py +0 -0
  25. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/__init__.py +0 -0
  26. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/__init__.py +0 -0
  27. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/config.py +0 -0
  28. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/provider/__init__.py +0 -0
  29. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/provider/daosub.py +0 -0
  30. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/provider/eventpub.py +0 -0
  31. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/provider/utils.py +0 -0
  32. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/testcontainer.py +0 -0
  33. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/akafka/testutils.py +0 -0
  34. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongodb/__init__.py +0 -0
  35. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongodb/migrations/__init__.py +0 -0
  36. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongodb/migrations/_manager.py +0 -0
  37. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongodb/migrations/_utils.py +0 -0
  38. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongodb/provider.py +0 -0
  39. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongodb/testutils.py +0 -0
  40. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongokafka/__init__.py +0 -0
  41. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongokafka/provider/__init__.py +0 -0
  42. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongokafka/provider/config.py +0 -0
  43. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongokafka/provider/daopub.py +0 -0
  44. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongokafka/provider/persistent_pub.py +0 -0
  45. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/mongokafka/testutils.py +0 -0
  46. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/__init__.py +0 -0
  47. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/provider.py +0 -0
  48. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/test_files/__init__.py +0 -0
  49. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/test_files/test_file1.yaml +0 -0
  50. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/test_files/test_file2.yaml +0 -0
  51. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/test_files/test_file3.yaml +0 -0
  52. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/test_files/test_file4.yaml +0 -0
  53. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/testutils/__init__.py +0 -0
  54. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/testutils/_fixtures.py +0 -0
  55. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/testutils/_typical_workflow.py +0 -0
  56. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/s3/testutils/_utils.py +0 -0
  57. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/testing/__init__.py +0 -0
  58. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/providers/testing/eventpub.py +0 -0
  59. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/py.typed +0 -0
  60. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit/utils.py +0 -0
  61. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit.egg-info/dependency_links.txt +0 -0
  62. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit.egg-info/requires.txt +0 -0
  63. {hexkit-4.6.2 → hexkit-5.0.0}/src/hexkit.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hexkit
3
- Version: 4.6.2
3
+ Version: 5.0.0
4
4
  Summary: A Toolkit for Building Microservices using the Hexagonal Architecture
5
5
  Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
6
6
  License: Apache 2.0
@@ -24,7 +24,7 @@ classifiers = [
24
24
  "Intended Audience :: Developers",
25
25
  ]
26
26
  name = "hexkit"
27
- version = "4.6.2"
27
+ version = "5.0.0"
28
28
  description = "A Toolkit for Building Microservices using the Hexagonal Architecture"
29
29
  dependencies = [
30
30
  "opentelemetry-api >=1.31.1, <2",
@@ -26,6 +26,7 @@ from opentelemetry.environment_variables import (
26
26
  )
27
27
  from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
28
28
  from opentelemetry.sdk.environment_variables import (
29
+ OTEL_EXPORTER_OTLP_ENDPOINT,
29
30
  OTEL_EXPORTER_OTLP_PROTOCOL,
30
31
  OTEL_SDK_DISABLED,
31
32
  )
@@ -33,9 +34,8 @@ from opentelemetry.sdk.resources import SERVICE_NAME, Resource
33
34
  from opentelemetry.sdk.trace import TracerProvider
34
35
  from opentelemetry.sdk.trace.export import BatchSpanProcessor
35
36
  from opentelemetry.sdk.trace.sampling import ParentBasedTraceIdRatio
36
- from pydantic import Field
37
+ from pydantic import AnyHttpUrl, Field
37
38
  from pydantic_settings import BaseSettings
38
- from typing_extensions import deprecated
39
39
 
40
40
  TRACER: Optional["SpanTracer"] = None
41
41
 
@@ -88,29 +88,23 @@ class OpenTelemetryConfig(BaseSettings):
88
88
  default="http/protobuf",
89
89
  description="Specifies which protocol should be used by exporters.",
90
90
  )
91
+ otel_exporter_endpoint: AnyHttpUrl = Field(
92
+ default=...,
93
+ description="Base endpoint URL for the collector that receives content from the exporter.",
94
+ examples=["http://localhost:4318"],
95
+ )
91
96
 
92
97
 
93
98
  def configure_opentelemetry(*, service_name: str, config: OpenTelemetryConfig):
94
99
  """Configure all needed parts of OpenTelemetry.
95
100
 
96
- Setup of the TracerProvider is done programmatically, all other configuration exports
97
- OpenTelemetry specific environment variables.
98
- """
99
- configure_tracer(service_name=service_name, config=config)
100
-
101
-
102
- @deprecated(
103
- "This function will be removed in v5. Use `configure_opentelemetry instead.`"
104
- )
105
- def configure_tracer(*, service_name: str, config: OpenTelemetryConfig):
106
- """Configure all needed parts of OpenTelemetry.
107
-
108
101
  Setup of the TracerProvider is done programmatically, all other configuration exports
109
102
  OpenTelemetry specific environment variables.
110
103
  """
111
104
  global TRACER
112
105
  # opentelemetry distro sets this to grpc, but in the current context http/protobuf is preferred
113
106
  os.environ[OTEL_EXPORTER_OTLP_PROTOCOL] = config.otel_exporter_protocol
107
+ os.environ[OTEL_EXPORTER_OTLP_ENDPOINT] = str(config.otel_exporter_endpoint)
114
108
  # Disable OpenTelemetry metrics and logs explicitly as they are not processed in the backend currently
115
109
  # This overwrites the defaults of `otlp` set in opentelemetry distro
116
110
  os.environ[OTEL_METRICS_EXPORTER] = "none"
@@ -395,7 +395,7 @@ class KafkaEventSubscriber(InboundProviderBase):
395
395
  "Can't enable DLQ when using DLQSubscriberProtocol. Disabling DLQ."
396
396
  )
397
397
  else:
398
- topics.append(config.service_name + "-retry")
398
+ topics.append("retry-" + config.service_name)
399
399
  if dlq_publisher is None:
400
400
  error = ValueError(
401
401
  "A publisher is required when the DLQ is enabled."
@@ -460,7 +460,7 @@ class KafkaEventSubscriber(InboundProviderBase):
460
460
  [] if self._using_dlq_protocol else translator.types_of_interest # type: ignore
461
461
  )
462
462
  self._dlq_publisher = dlq_publisher
463
- self._retry_topic = config.service_name + "-retry"
463
+ self._retry_topic = "retry-" + config.service_name
464
464
  self._dlq_topic = config.kafka_dlq_topic
465
465
  self._service_name = config.service_name
466
466
  self._max_retries = config.kafka_max_retries
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hexkit
3
- Version: 4.6.2
3
+ Version: 5.0.0
4
4
  Summary: A Toolkit for Building Microservices using the Hexagonal Architecture
5
5
  Author-email: "German Human Genome Phenome Archive (GHGA)" <contact@ghga.de>
6
6
  License: Apache 2.0
@@ -9,7 +9,7 @@ src/hexkit/config.py
9
9
  src/hexkit/correlation.py
10
10
  src/hexkit/custom_types.py
11
11
  src/hexkit/log.py
12
- src/hexkit/opentelemetry_setup.py
12
+ src/hexkit/opentelemetry.py
13
13
  src/hexkit/py.typed
14
14
  src/hexkit/utils.py
15
15
  src/hexkit.egg-info/PKG-INFO
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