dagster-datadog 0.28.10__tar.gz → 0.28.12__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dagster-datadog
3
- Version: 0.28.10
3
+ Version: 0.28.12
4
4
  Summary: Package for datadog Dagster framework components.
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-datadog
6
6
  Author: Dagster Labs
@@ -15,7 +15,7 @@ Classifier: License :: OSI Approved :: Apache Software License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Requires-Python: >=3.10,<3.15
17
17
  License-File: LICENSE
18
- Requires-Dist: dagster==1.12.10
18
+ Requires-Dist: dagster==1.12.12
19
19
  Requires-Dist: datadog
20
20
  Dynamic: author
21
21
  Dynamic: author-email
@@ -1,3 +1,5 @@
1
+ from typing import Optional
2
+
1
3
  from dagster import ConfigurableResource, resource
2
4
  from dagster._annotations import beta
3
5
  from dagster._core.definitions.resource_definition import dagster_maintained_resource
@@ -14,10 +16,47 @@ class DatadogClient:
14
16
  DogStatsd.UNKNOWN,
15
17
  )
16
18
 
17
- def __init__(self, api_key: str, app_key: str):
19
+ def __init__(
20
+ self,
21
+ api_key: Optional[str],
22
+ app_key: Optional[str],
23
+ host_name: Optional[str] = None,
24
+ api_host: Optional[str] = None,
25
+ statsd_host: Optional[str] = None,
26
+ statsd_port: Optional[int] = None,
27
+ statsd_disable_aggregation: bool = True,
28
+ statsd_disable_buffering: bool = True,
29
+ statsd_aggregation_flush_interval: float = 0.3,
30
+ statsd_use_default_route: bool = False,
31
+ statsd_socket_path: Optional[str] = None,
32
+ statsd_namespace: Optional[str] = None,
33
+ statsd_max_samples_per_context: Optional[int] = 0,
34
+ statsd_constant_tags: Optional[list[str]] = None,
35
+ return_raw_response: bool = False,
36
+ hostname_from_config: bool = True,
37
+ cardinality: Optional[str] = None,
38
+ ):
18
39
  self.api_key = api_key
19
40
  self.app_key = app_key
20
- initialize(api_key=api_key, app_key=app_key)
41
+ initialize(
42
+ api_key=api_key,
43
+ app_key=app_key,
44
+ host_name=host_name,
45
+ api_host=api_host,
46
+ statsd_host=statsd_host,
47
+ statsd_port=statsd_port,
48
+ statsd_disable_aggregation=statsd_disable_aggregation,
49
+ statsd_disable_buffering=statsd_disable_buffering,
50
+ statsd_aggregation_flush_interval=statsd_aggregation_flush_interval,
51
+ statsd_use_default_route=statsd_use_default_route,
52
+ statsd_socket_path=statsd_socket_path,
53
+ statsd_namespace=statsd_namespace,
54
+ statsd_max_samples_per_context=statsd_max_samples_per_context,
55
+ statsd_constant_tags=statsd_constant_tags,
56
+ return_raw_response=return_raw_response,
57
+ hostname_from_config=hostname_from_config,
58
+ cardinality=cardinality,
59
+ )
21
60
 
22
61
  # Pull in methods from the dogstatsd library
23
62
  for method in [
@@ -92,13 +131,46 @@ class DatadogResource(ConfigurableResource):
92
131
  " https://docs.datadoghq.com/account_management/api-app-keys/."
93
132
  )
94
133
  )
134
+ host_name: Optional[str] = None
135
+ api_host: Optional[str] = None
136
+ statsd_host: Optional[str] = None
137
+ statsd_port: Optional[int] = None
138
+ statsd_disable_aggregation: bool = True
139
+ statsd_disable_buffering: bool = True
140
+ statsd_aggregation_flush_interval: float = 0.3
141
+ statsd_use_default_route: bool = False
142
+ statsd_socket_path: Optional[str] = None
143
+ statsd_namespace: Optional[str] = None
144
+ statsd_max_samples_per_context: Optional[int] = 0
145
+ statsd_constant_tags: Optional[list[str]] = None
146
+ return_raw_response: bool = False
147
+ hostname_from_config: bool = True
148
+ cardinality: Optional[str] = None
95
149
 
96
150
  @classmethod
97
151
  def _is_dagster_maintained(cls) -> bool:
98
152
  return True
99
153
 
100
154
  def get_client(self) -> DatadogClient:
101
- return DatadogClient(self.api_key, self.app_key)
155
+ return DatadogClient(
156
+ api_key=self.api_key,
157
+ app_key=self.app_key,
158
+ host_name=self.host_name,
159
+ api_host=self.api_host,
160
+ statsd_host=self.statsd_host,
161
+ statsd_port=self.statsd_port,
162
+ statsd_disable_aggregation=self.statsd_disable_aggregation,
163
+ statsd_disable_buffering=self.statsd_disable_buffering,
164
+ statsd_aggregation_flush_interval=self.statsd_aggregation_flush_interval,
165
+ statsd_use_default_route=self.statsd_use_default_route,
166
+ statsd_socket_path=self.statsd_socket_path,
167
+ statsd_namespace=self.statsd_namespace,
168
+ statsd_max_samples_per_context=self.statsd_max_samples_per_context,
169
+ statsd_constant_tags=self.statsd_constant_tags,
170
+ return_raw_response=self.return_raw_response,
171
+ hostname_from_config=self.hostname_from_config,
172
+ cardinality=self.cardinality,
173
+ )
102
174
 
103
175
 
104
176
  @beta
@@ -0,0 +1 @@
1
+ __version__ = "0.28.12"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dagster-datadog
3
- Version: 0.28.10
3
+ Version: 0.28.12
4
4
  Summary: Package for datadog Dagster framework components.
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-datadog
6
6
  Author: Dagster Labs
@@ -15,7 +15,7 @@ Classifier: License :: OSI Approved :: Apache Software License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Requires-Python: >=3.10,<3.15
17
17
  License-File: LICENSE
18
- Requires-Dist: dagster==1.12.10
18
+ Requires-Dist: dagster==1.12.12
19
19
  Requires-Dist: datadog
20
20
  Dynamic: author
21
21
  Dynamic: author-email
@@ -0,0 +1,2 @@
1
+ dagster==1.12.12
2
+ datadog
@@ -36,6 +36,6 @@ setup(
36
36
  packages=find_packages(exclude=["dagster_datadog_tests*"]),
37
37
  include_package_data=True,
38
38
  python_requires=">=3.10,<3.15",
39
- install_requires=["dagster==1.12.10", "datadog"],
39
+ install_requires=["dagster==1.12.12", "datadog"],
40
40
  zip_safe=False,
41
41
  )
@@ -1 +0,0 @@
1
- __version__ = "0.28.10"
@@ -1,2 +0,0 @@
1
- dagster==1.12.10
2
- datadog