Skip to content

Commit b3902bd

Browse files
Merge branch 'master' into patch-1
2 parents 22b0d18 + 4d1c527 commit b3902bd

38 files changed

Lines changed: 2239 additions & 149 deletions

.github/CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
/tests/unit/threadstats/ @DataDog/web-frameworks @DataDog/agent-metric-pipelines
3030

3131
# Documentation
32-
*.md @DataDog/documentation @DataDog/web-frameworks
33-
LICENSE @DataDog/documentation @DataDog/web-frameworks
32+
*.md @DataDog/web-frameworks
33+
LICENSE @DataDog/web-frameworks

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@v3
32+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@v2
36+
uses: github/codeql-action/init@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2.28.1
3737
with:
3838
languages: ${{ matrix.language }}
3939
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@v2
47+
uses: github/codeql-action/autobuild@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2.28.1
4848

4949
- name: Perform CodeQL Analysis
50-
uses: github/codeql-action/analyze@v2
50+
uses: github/codeql-action/analyze@b8d3b6e8af63cde30bdc382c0bc28114f4346c88 # v2.28.1

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ jobs:
1111
triage:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: DataDog/labeler@glob-all
14+
- uses: DataDog/labeler@5170395583c7f7ec92989fd24faffc5b6154b866 # glob-all
1515
with:
1616
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ on:
1212

1313
jobs:
1414
build_wheels:
15-
name: Build wheels on Ubuntu 20.04
16-
runs-on: ubuntu-20.04
15+
name: Build wheels on Ubuntu latest
16+
runs-on: ubuntu-latest
1717
if: github.event_name == 'release' && github.event.action == 'published'
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
2020
# Include all history and tags, needed for building the right version
2121
with:
2222
fetch-depth: 0
2323

24-
- uses: actions/setup-python@v2
24+
- uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
2525
name: Install Python
2626
with:
2727
python-version: '3.9'

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
stale:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/stale@v1
18+
- uses: actions/stale@0649bd81195b7ac109fbf9dde113af7e58a78b8e # v1.1.1
1919
with:
2020
repo-token: ${{ secrets.GITHUB_TOKEN }}
2121
stale-issue-message: >-

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
name: Lint datadopy files
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2424

2525
- name: Set up Python 3.8
26-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
2727
with:
2828
python-version: "3.8"
2929

@@ -55,10 +55,10 @@ jobs:
5555
TOXENV: ${{ matrix.python-version }}
5656

5757
steps:
58-
- uses: actions/checkout@v3
58+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5959

6060
- name: Set up Python ${{ matrix.python-version }}
61-
uses: actions/setup-python@v4
61+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
6262
with:
6363
python-version: ${{ matrix.python-version }}
6464

.github/workflows/test_integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false && contains(github.event.pull_request.labels.*.name, 'ci/integrations')
2424
steps:
2525
- name: Checkout code
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2727

2828
- name: Set up Python 3.7
29-
uses: actions/setup-python@v4
29+
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
3030
with:
3131
python-version: "3.7"
3232
cache: "pip"

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## v0.52.1 / 2025-07-31
4+
5+
* [Fixed] Fix missing transport attribute when flushing telemetry. See [#902](https://github.com/DataDog/datadogpy/pull/902).
6+
7+
## Unreleased
8+
* [Fixed] Fix missing transport attribute when flushing telemetry.
9+
10+
## v0.52.0 / 2025-07-08
11+
12+
* [Added] Add Cardinality common field. See [#883](https://github.com/DataDog/datadogpy/pull/883)
13+
* [Added] Add Cloud SIEM rule management and security signals retrieval. See [#893](https://github.com/DataDog/datadogpy/pull/893)
14+
* [Added] Add dogshell command for security monitoring rule and signal management. See [#893](https://github.com/DataDog/datadogpy/pull/893)
15+
* [Added] Add UDS SOCK_STREAM support to the DogStatsD client. See [#869](https://github.com/DataDog/datadogpy/pull/869)
16+
* [Added] Max samples per context for Histogram, Distribution and Timing metrics (Experimental Feature). See [#863](https://github.com/DataDog/datadogpy/pull/863)
17+
318
## v0.51.0 / 2025-01-27
419

520
* [Added] Add hosts endpoint. See [#884](https://github.com/DataDog/datadogpy/pull/884).

datadog/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def initialize(
4747
statsd_constant_tags=None, # type: Optional[List[str]]
4848
return_raw_response=False, # type: bool
4949
hostname_from_config=True, # type: bool
50+
cardinality=None, # type: Optional[str]
5051
**kwargs # type: Any
5152
):
5253
# type: (...) -> None
@@ -117,6 +118,12 @@ def initialize(
117118
118119
:param hostname_from_config: Set the hostname from the Datadog agent config (agent 5). Will be deprecated
119120
:type hostname_from_config: boolean
121+
122+
:param cardinality: Set the global cardinality for all metrics. \
123+
Possible values are "none", "low", "orchestrator" and "high".
124+
Can also be set via the DATADOG_CARDINALITY or DD_CARDINALITY environment variables.
125+
:type cardinality: string
126+
120127
"""
121128
# API configuration
122129
api._api_key = api_key or api._api_key or os.environ.get("DATADOG_API_KEY", os.environ.get("DD_API_KEY"))
@@ -151,6 +158,9 @@ def initialize(
151158
statsd.disable_buffering = statsd_disable_buffering
152159
api._return_raw_response = return_raw_response
153160

161+
# Set the global cardinality for all metrics
162+
statsd.cardinality = cardinality or os.environ.get("DATADOG_CARDINALITY", os.environ.get("DD_CARDINALITY"))
163+
154164
# HTTP client and API options
155165
for key, value in iteritems(kwargs):
156166
attribute = "_{}".format(key)

datadog/api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,5 @@
5050
from datadog.api.service_level_objectives import ServiceLevelObjective
5151
from datadog.api.synthetics import Synthetics
5252
from datadog.api.logs import Logs
53+
from datadog.api.security_monitoring_rules import SecurityMonitoringRule
54+
from datadog.api.security_monitoring_signals import SecurityMonitoringSignal

0 commit comments

Comments
 (0)