From 10080f765d43dfb5539bc28dc30a492859b0ede5 Mon Sep 17 00:00:00 2001 From: "dd-pub-platform[bot]" <157534740+dd-pub-platform[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 08:10:19 +0000 Subject: [PATCH 1/4] Update WarpStream integration --- warpstream/CHANGELOG.md | 2 +- warpstream/assets/configuration/spec.yaml | 15 ----- warpstream/assets/service_checks.json | 2 +- warpstream/datadog_checks/__init__.py | 1 - .../datadog_checks/warpstream/__about__.py | 1 - .../datadog_checks/warpstream/__init__.py | 4 -- warpstream/datadog_checks/warpstream/check.py | 48 --------------- .../warpstream/config_models/__init__.py | 20 ------- .../warpstream/config_models/defaults.py | 20 ------- .../warpstream/config_models/instance.py | 59 ------------------ .../warpstream/config_models/shared.py | 41 ------------- .../warpstream/config_models/validators.py | 9 --- .../warpstream/data/conf.yaml.example | 59 ------------------ warpstream/hatch.toml | 8 --- warpstream/manifest.json | 4 +- warpstream/metadata.csv | 7 ++- warpstream/pyproject.toml | 60 ------------------- warpstream/tests/__init__.py | 1 - warpstream/tests/common.py | 12 ---- warpstream/tests/conftest.py | 25 -------- warpstream/tests/docker-compose.yml | 16 ----- warpstream/tests/test_integration.py | 13 ---- warpstream/tests/test_unit.py | 36 ----------- 23 files changed, 10 insertions(+), 453 deletions(-) delete mode 100644 warpstream/assets/configuration/spec.yaml delete mode 100644 warpstream/datadog_checks/__init__.py delete mode 100644 warpstream/datadog_checks/warpstream/__about__.py delete mode 100644 warpstream/datadog_checks/warpstream/__init__.py delete mode 100644 warpstream/datadog_checks/warpstream/check.py delete mode 100644 warpstream/datadog_checks/warpstream/config_models/__init__.py delete mode 100644 warpstream/datadog_checks/warpstream/config_models/defaults.py delete mode 100644 warpstream/datadog_checks/warpstream/config_models/instance.py delete mode 100644 warpstream/datadog_checks/warpstream/config_models/shared.py delete mode 100644 warpstream/datadog_checks/warpstream/config_models/validators.py delete mode 100644 warpstream/datadog_checks/warpstream/data/conf.yaml.example delete mode 100644 warpstream/hatch.toml delete mode 100644 warpstream/pyproject.toml delete mode 100644 warpstream/tests/__init__.py delete mode 100644 warpstream/tests/common.py delete mode 100644 warpstream/tests/conftest.py delete mode 100644 warpstream/tests/docker-compose.yml delete mode 100644 warpstream/tests/test_integration.py delete mode 100644 warpstream/tests/test_unit.py diff --git a/warpstream/CHANGELOG.md b/warpstream/CHANGELOG.md index 0b24b45a85..730e62079d 100644 --- a/warpstream/CHANGELOG.md +++ b/warpstream/CHANGELOG.md @@ -1,4 +1,4 @@ -# CHANGELOG - WarpStream +# CHANGELOG - warpstream ## 1.0.0 / 2025-07-04 diff --git a/warpstream/assets/configuration/spec.yaml b/warpstream/assets/configuration/spec.yaml deleted file mode 100644 index 5738aee621..0000000000 --- a/warpstream/assets/configuration/spec.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: warpstream -files: -- name: warpstream.yaml - options: - - template: init_config - options: - - template: init_config/default - - template: instances - options: - - name: url - required: true - description: The URL used to connect to the Warpstream agent instance (use the Agent REST API endpoint). - value: - type: string - - template: instances/default diff --git a/warpstream/assets/service_checks.json b/warpstream/assets/service_checks.json index fe51488c70..0637a088a0 100644 --- a/warpstream/assets/service_checks.json +++ b/warpstream/assets/service_checks.json @@ -1 +1 @@ -[] +[] \ No newline at end of file diff --git a/warpstream/datadog_checks/__init__.py b/warpstream/datadog_checks/__init__.py deleted file mode 100644 index 0d1f7edf5d..0000000000 --- a/warpstream/datadog_checks/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore diff --git a/warpstream/datadog_checks/warpstream/__about__.py b/warpstream/datadog_checks/warpstream/__about__.py deleted file mode 100644 index 1f356cc57b..0000000000 --- a/warpstream/datadog_checks/warpstream/__about__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = '1.0.0' diff --git a/warpstream/datadog_checks/warpstream/__init__.py b/warpstream/datadog_checks/warpstream/__init__.py deleted file mode 100644 index 976f2feb2b..0000000000 --- a/warpstream/datadog_checks/warpstream/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .__about__ import __version__ -from .check import WarpstreamCheck - -__all__ = ['__version__', 'WarpstreamCheck'] diff --git a/warpstream/datadog_checks/warpstream/check.py b/warpstream/datadog_checks/warpstream/check.py deleted file mode 100644 index 695cf6e067..0000000000 --- a/warpstream/datadog_checks/warpstream/check.py +++ /dev/null @@ -1,48 +0,0 @@ -from requests.exceptions import ConnectionError, HTTPError, InvalidURL, Timeout - -from datadog_checks.base import AgentCheck, ConfigurationError - - -class WarpstreamCheck(AgentCheck): - # This will be the prefix of every metric and service check the integration sends - __NAMESPACE__ = 'warpstream' - - def __init__(self, name, init_config, instances): - super(WarpstreamCheck, self).__init__(name, init_config, instances) - - self._url = self.instance.get('url', '') - self._tags = self.instance.get('tags', []) - # The Agent only makes one attempt to instantiate each AgentCheck so any errors occurring - # in `__init__` are logged just once, making it difficult to spot. Therefore, we emit - # potential configuration errors as part of the check run phase. - # The configuration is only parsed once if it succeed, otherwise it's retried. - self.check_initializations.append(self._parse_config) - - def _parse_config(self): - if not self._url: - raise ConfigurationError('Missing configuration: url') - - def check(self, _): - tags = ['url:{}'.format(self._url)] + self._tags - - url_warpstream_agent = self._url + "/api/v1/status" - - # Perform HTTP Requests with our HTTP wrapper. - # More info at https://datadoghq.dev/integrations-core/base/http/ - try: - response = self.http.get(url_warpstream_agent) - response.raise_for_status() - - except Timeout: - self.gauge('can_connect', 0, tags=tags) - raise - - except (HTTPError, InvalidURL, ConnectionError): - self.gauge('can_connect', 0, tags=tags) - raise - - except ValueError: - self.gauge('can_connect', 0, tags=tags) - raise - - self.gauge('can_connect', 1, tags=tags) diff --git a/warpstream/datadog_checks/warpstream/config_models/__init__.py b/warpstream/datadog_checks/warpstream/config_models/__init__.py deleted file mode 100644 index 5c2bf5c9f4..0000000000 --- a/warpstream/datadog_checks/warpstream/config_models/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file is autogenerated. -# To change this file you should edit assets/configuration/spec.yaml and then run the following commands: -# ddev -x validate config -s -# ddev -x validate models -s - -from .instance import InstanceConfig -from .shared import SharedConfig - - -class ConfigMixin: - _config_model_instance: InstanceConfig - _config_model_shared: SharedConfig - - @property - def config(self) -> InstanceConfig: - return self._config_model_instance - - @property - def shared_config(self) -> SharedConfig: - return self._config_model_shared diff --git a/warpstream/datadog_checks/warpstream/config_models/defaults.py b/warpstream/datadog_checks/warpstream/config_models/defaults.py deleted file mode 100644 index fd5d890ccb..0000000000 --- a/warpstream/datadog_checks/warpstream/config_models/defaults.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file is autogenerated. -# To change this file you should edit assets/configuration/spec.yaml and then run the following commands: -# ddev -x validate config -s -# ddev -x validate models -s - - -def instance_disable_generic_tags(): - return False - - -def instance_empty_default_hostname(): - return False - - -def instance_enable_legacy_tags_normalization(): - return True - - -def instance_min_collection_interval(): - return 15 diff --git a/warpstream/datadog_checks/warpstream/config_models/instance.py b/warpstream/datadog_checks/warpstream/config_models/instance.py deleted file mode 100644 index 923936d524..0000000000 --- a/warpstream/datadog_checks/warpstream/config_models/instance.py +++ /dev/null @@ -1,59 +0,0 @@ -# This file is autogenerated. -# To change this file you should edit assets/configuration/spec.yaml and then run the following commands: -# ddev -x validate config -s -# ddev -x validate models -s - -from __future__ import annotations - -from typing import Optional - -from pydantic import BaseModel, ConfigDict, field_validator, model_validator - -from datadog_checks.base.utils.functions import identity -from datadog_checks.base.utils.models import validation - -from . import defaults, validators - - -class MetricPatterns(BaseModel): - model_config = ConfigDict( - arbitrary_types_allowed=True, - frozen=True, - ) - exclude: Optional[tuple[str, ...]] = None - include: Optional[tuple[str, ...]] = None - - -class InstanceConfig(BaseModel): - model_config = ConfigDict( - validate_default=True, - arbitrary_types_allowed=True, - frozen=True, - ) - disable_generic_tags: Optional[bool] = None - empty_default_hostname: Optional[bool] = None - enable_legacy_tags_normalization: Optional[bool] = None - metric_patterns: Optional[MetricPatterns] = None - min_collection_interval: Optional[float] = None - service: Optional[str] = None - tags: Optional[tuple[str, ...]] = None - url: str - - @model_validator(mode='before') - def _initial_validation(cls, values): - return validation.core.initialize_config(getattr(validators, 'initialize_instance', identity)(values)) - - @field_validator('*', mode='before') - def _validate(cls, value, info): - field = cls.model_fields[info.field_name] - field_name = field.alias or info.field_name - if field_name in info.context['configured_fields']: - value = getattr(validators, f'instance_{info.field_name}', identity)(value, field=field) - else: - value = getattr(defaults, f'instance_{info.field_name}', lambda: value)() - - return validation.utils.make_immutable(value) - - @model_validator(mode='after') - def _final_validation(cls, model): - return validation.core.check_model(getattr(validators, 'check_instance', identity)(model)) diff --git a/warpstream/datadog_checks/warpstream/config_models/shared.py b/warpstream/datadog_checks/warpstream/config_models/shared.py deleted file mode 100644 index 4017c43e2e..0000000000 --- a/warpstream/datadog_checks/warpstream/config_models/shared.py +++ /dev/null @@ -1,41 +0,0 @@ -# This file is autogenerated. -# To change this file you should edit assets/configuration/spec.yaml and then run the following commands: -# ddev -x validate config -s -# ddev -x validate models -s - -from __future__ import annotations - -from typing import Optional - -from pydantic import BaseModel, ConfigDict, field_validator, model_validator - -from datadog_checks.base.utils.functions import identity -from datadog_checks.base.utils.models import validation - -from . import validators - - -class SharedConfig(BaseModel): - model_config = ConfigDict( - validate_default=True, - arbitrary_types_allowed=True, - frozen=True, - ) - service: Optional[str] = None - - @model_validator(mode='before') - def _initial_validation(cls, values): - return validation.core.initialize_config(getattr(validators, 'initialize_shared', identity)(values)) - - @field_validator('*', mode='before') - def _validate(cls, value, info): - field = cls.model_fields[info.field_name] - field_name = field.alias or info.field_name - if field_name in info.context['configured_fields']: - value = getattr(validators, f'shared_{info.field_name}', identity)(value, field=field) - - return validation.utils.make_immutable(value) - - @model_validator(mode='after') - def _final_validation(cls, model): - return validation.core.check_model(getattr(validators, 'check_shared', identity)(model)) diff --git a/warpstream/datadog_checks/warpstream/config_models/validators.py b/warpstream/datadog_checks/warpstream/config_models/validators.py deleted file mode 100644 index 39523e4f92..0000000000 --- a/warpstream/datadog_checks/warpstream/config_models/validators.py +++ /dev/null @@ -1,9 +0,0 @@ -# Here you can include additional config validators or transformers -# -# def initialize_instance(values, **kwargs): -# if 'my_option' not in values and 'my_legacy_option' in values: -# values['my_option'] = values['my_legacy_option'] -# if values.get('my_number') > 10: -# raise ValueError('my_number max value is 10, got %s' % str(values.get('my_number'))) -# -# return values diff --git a/warpstream/datadog_checks/warpstream/data/conf.yaml.example b/warpstream/datadog_checks/warpstream/data/conf.yaml.example deleted file mode 100644 index de7c27f5c7..0000000000 --- a/warpstream/datadog_checks/warpstream/data/conf.yaml.example +++ /dev/null @@ -1,59 +0,0 @@ -## All options defined here are available to all instances. -# -init_config: - - ## @param service - string - optional - ## Attach the tag `service:` to every metric, event, and service check emitted by this integration. - ## - ## Additionally, this sets the default `service` for every log source. - # - # service: - -## Every instance is scheduled independently of the others. -# -instances: - - ## @param url - string - required - ## The URL used to connect to the Warpstream agent instance (use the Agent REST API endpoint). - # - - url: - - ## @param tags - list of strings - optional - ## A list of tags to attach to every metric and service check emitted by this instance. - ## - ## Learn more about tagging at https://docs.datadoghq.com/tagging - # - # tags: - # - : - # - : - - ## @param service - string - optional - ## Attach the tag `service:` to every metric, event, and service check emitted by this integration. - ## - ## Overrides any `service` defined in the `init_config` section. - # - # service: - - ## @param min_collection_interval - number - optional - default: 15 - ## This changes the collection interval of the check. For more information, see: - ## https://docs.datadoghq.com/developers/write_agent_check/#collection-interval - # - # min_collection_interval: 15 - - ## @param empty_default_hostname - boolean - optional - default: false - ## This forces the check to send metrics with no hostname. - ## - ## This is useful for cluster-level checks. - # - # empty_default_hostname: false - - ## @param metric_patterns - mapping - optional - ## A mapping of metrics to include or exclude, with each entry being a regular expression. - ## - ## Metrics defined in `exclude` will take precedence in case of overlap. - # - # metric_patterns: - # include: - # - - # exclude: - # - diff --git a/warpstream/hatch.toml b/warpstream/hatch.toml deleted file mode 100644 index d52a1922d8..0000000000 --- a/warpstream/hatch.toml +++ /dev/null @@ -1,8 +0,0 @@ -[env.collectors.datadog-checks] - -[[envs.default.matrix]] -python = ["3.13"] - -[envs.default] -e2e-env = false - diff --git a/warpstream/manifest.json b/warpstream/manifest.json index a8ce20a8ad..f9ca609005 100644 --- a/warpstream/manifest.json +++ b/warpstream/manifest.json @@ -1,6 +1,5 @@ { "app_id": "warpstream", - "owner": "integrations-developer-platform", "app_uuid": "01954cf7-1c47-75a3-818b-bf5ebeacb349", "manifest_version": "2.0.0", "display_on_public_website": true, @@ -85,5 +84,6 @@ "source_type_id": 44100993, "supports_ddr_coordinated_failover": false } - } + }, + "owner": "integrations-developer-platform" } \ No newline at end of file diff --git a/warpstream/metadata.csv b/warpstream/metadata.csv index 5e37a4acca..f6e61021b3 100644 --- a/warpstream/metadata.csv +++ b/warpstream/metadata.csv @@ -189,12 +189,14 @@ warpstream.tableflow_files_limit,gauge,,,,max number of Tableflow files on a giv warpstream.tableflow_partitions_limit,gauge,,,,max number of Tableflow partitions on a given cluster,0,warpstream,tableflow_partitions_limit, warpstream.agent_tableflow_files_written,count,,,,number of files written by WarpStream Agents while ingesting from Kafka to Tableflow tagged by `source_topic`,1,warpstream,agent_tableflow_files_written, warpstream.ingestion_job_kafka_time_lag_ms,gauge,,millisecond,,time lag of the Tableflow ingestion job that is consuming from Kafka and producing Tableflow files - this is deprecated please use `warpstream.tableflow_partition_time_lag_seconds`,1,warpstream,ingestion_job_kafka_time_lag_ms, -warpstream.ingestion_job_dlq_skip_strategy_counter,count,,,,counts the number of records that were skipped during Tableflow ingestion while using the skip strategy tagged by `topic`,1,warpstream,ingestion_job_dlq_skip_strategy_counter, +warpstream.ingestion_job_dlq_skip_strategy_counter,count,,,,DEPRECATED: use warpstream.tableflow_dlq_records_counter with strategy tag instead,1,warpstream,ingestion_job_dlq_skip_strategy_counter, +warpstream.tableflow_dlq_records_counter,count,,,,counts the number of records handled by the Tableflow DLQ during ingestion tagged by `topic` and `strategy` (skip or keep),1,warpstream,tableflow_dlq_records_counter, warpstream.tableflow_tables_count,count,,,,counts the number of Tableflow tables created by WarpStream Agents,0,warpstream,tableflow_tables_count, warpstream.tableflow_snapshots_count,count,,,,counts the number of Tableflow snapshots created by WarpStream Agents,0,warpstream,tableflow_snapshots_count, warpstream.tableflow_files_count,count,,,,counts the number of Tableflow files created by WarpStream Agents,0,warpstream,tableflow_files_count, warpstream.tableflow_partitions_count,count,,,,counts the number of Tableflow partitions created by WarpStream Agents,0,warpstream,tableflow_partitions_count, warpstream.tableflow_partition_time_lag_seconds,gauge,,second,,time lag of the Tableflow ingestion job that is consuming from Kafka and producing Tableflow files,1,warpstream,tableflow_partition_time_lag_seconds, +warpstream.tableflow_partition_offset_lag,gauge,,,,offset lag (number of records) of the Tableflow ingestion job that is consuming from Kafka and producing Tableflow files,1,warpstream,tableflow_partition_offset_lag, warpstream.batcher_batches_count,count,,,,counts the number of items in each batch produced by a batcher,1,warpstream,batcher_batches_count, warpstream.batcher_batches_distribution,gauge,,,,distribution of the number of items in each batch produced by a batcher,0,warpstream,batcher_batches_distribution, warpstream.batcher_called,count,,,,counts the number of times a batcher was called,1,warpstream,batcher_called, @@ -272,3 +274,6 @@ warpstream.bento_rate_limit_triggered,count,,,,counts the number of times the ra warpstream.bento_output_connection_up,count,,,,counts the number of the times the output has successfully established a connection to the target sink in Managed Data Pipelines,1,warpstream,bento_output_connection_up, warpstream.bento_output_connection_lost,count,,,,counts the number of times the output has lost a previously established connection to the target sink in Managed Data Pipelines,1,warpstream,bento_output_connection_lost, warpstream.bento_output_connection_failed,count,,,,counts the number of times the output has failed to establish a connection to the target sink in Managed Data Pipelines,1,warpstream,bento_output_connection_failed, +warpstream.tableflow_ingestion_lag_seconds,gauge,,second,,measures how far behind the ingestion process is from the source Kafka topic,0,warpstream,tableflow_ingestion_lag_seconds, +warpstream.tableflow_query_lag_seconds,gauge,,second,,measures the time from when data is produced to Kafka until it is queryable (ingestion lag and catalog sync delay),0,warpstream,tableflow_query_lag_seconds, +warpstream.bento_output_error,count,,,,counts the number of send attempts that have failed in Managed Data Pipelines. On failed batched sends this count is incremented once only,1,warpstream,bento_output_error, diff --git a/warpstream/pyproject.toml b/warpstream/pyproject.toml deleted file mode 100644 index 3ec7b00e20..0000000000 --- a/warpstream/pyproject.toml +++ /dev/null @@ -1,60 +0,0 @@ -[build-system] -requires = [ - "hatchling>=0.13.0", -] -build-backend = "hatchling.build" - -[project] -name = "datadog-warpstream" -description = "The WarpStream check" -#readme = "README.md" -license = "BSD-3-Clause" -requires-python = ">=3.11" -keywords = [ - "datadog", - "datadog agent", - "datadog check", - "warpstream", -] -authors = [ - { name = "Emmanuel Pot", email = "support@warpstreamlabs.com" }, -] -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: BSD License", - "Private :: Do Not Upload", - "Programming Language :: Python :: 3.13", - "Topic :: System :: Monitoring", -] -dependencies = [ - "datadog-checks-base>=37.21.0", -] -dynamic = [ - "version", -] - -[project.optional-dependencies] -deps = [] - -[project.urls] -Source = "https://github.com/DataDog/integrations-extras" - -[tool.hatch.version] -path = "datadog_checks/warpstream/__about__.py" - -[tool.hatch.build.targets.sdist] -include = [ - "/datadog_checks", - "/tests", - "/manifest.json", -] - -[tool.hatch.build.targets.wheel] -include = [ - "/datadog_checks/warpstream", -] -dev-mode-dirs = [ - ".", -] diff --git a/warpstream/tests/__init__.py b/warpstream/tests/__init__.py deleted file mode 100644 index 8b13789179..0000000000 --- a/warpstream/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/warpstream/tests/common.py b/warpstream/tests/common.py deleted file mode 100644 index 0b8882191a..0000000000 --- a/warpstream/tests/common.py +++ /dev/null @@ -1,12 +0,0 @@ -from datadog_checks.dev import get_docker_hostname - -HOST = get_docker_hostname() - -URL = 'http://{}:8080'.format(HOST) - -INSTANCE = {'url': URL} - -FULL_CONFIG = { - 'instances': [INSTANCE], - 'init_config': {}, -} diff --git a/warpstream/tests/conftest.py b/warpstream/tests/conftest.py deleted file mode 100644 index 282ee50988..0000000000 --- a/warpstream/tests/conftest.py +++ /dev/null @@ -1,25 +0,0 @@ -import os - -import pytest - -from datadog_checks.dev import docker_run, get_here - -from .common import INSTANCE, URL - - -@pytest.fixture(scope='session') -def instance(): - return INSTANCE.copy() - - -@pytest.fixture(scope='session') -def dd_environment(): - compose_file = os.path.join(get_here(), 'docker-compose.yml') - - # This does 3 things: - # - # 1. Spins up the services defined in the compose file - # 2. Waits for the url to be available before running the tests - # 3. Tears down the services when the tests are finished - with docker_run(compose_file, endpoints=[f"{URL}/api/v1/status"]): - yield INSTANCE diff --git a/warpstream/tests/docker-compose.yml b/warpstream/tests/docker-compose.yml deleted file mode 100644 index 48ba65716f..0000000000 --- a/warpstream/tests/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -services: - warp: - image: public.ecr.aws/warpstream-labs/warpstream_agent:latest - ports: - - "8080:8080" - command: - - playground - environment: - # this is a no-op as it will default on the custom advertised hostname defined above, but you can change this if you want to use a different hostname with Kafka - - WARPSTREAM_DISCOVERY_KAFKA_HOSTNAME_OVERRIDE=warp - healthcheck: - # Wait for the Agent to finish setting up the demo before marking it as healthy - test: ["CMD", "sh", "-c", "sleep 10"] - interval: 5s - timeout: 15s - retries: 5 \ No newline at end of file diff --git a/warpstream/tests/test_integration.py b/warpstream/tests/test_integration.py deleted file mode 100644 index 2ffb9c04bd..0000000000 --- a/warpstream/tests/test_integration.py +++ /dev/null @@ -1,13 +0,0 @@ -import pytest - -from datadog_checks.base import AgentCheck # noqa: F401 -from datadog_checks.warpstream import WarpstreamCheck - - -@pytest.mark.integration -@pytest.mark.usefixtures('dd_environment') -def test_service_check(aggregator, instance): - c = WarpstreamCheck('warpstream', {}, [instance]) - - # the check should send OK - c.check(instance) diff --git a/warpstream/tests/test_unit.py b/warpstream/tests/test_unit.py deleted file mode 100644 index a27da64dfd..0000000000 --- a/warpstream/tests/test_unit.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Any, Callable, Dict # noqa: F401 - -import mock -import pytest - -from datadog_checks.base import AgentCheck # noqa: F401 -from datadog_checks.base.stubs.aggregator import AggregatorStub # noqa: F401 -from datadog_checks.dev.utils import get_metadata_metrics -from datadog_checks.warpstream import WarpstreamCheck - -from . import common - - -@pytest.mark.parametrize( - 'status_code, expected_healthy_status, expected_healthy_value', - [ - (200, AgentCheck.OK, 1), - (500, AgentCheck.WARNING, 1), - ], -) -def test_check(dd_run_check, aggregator, status_code, expected_healthy_status, expected_healthy_value): - # type: (Callable[[AgentCheck, bool], None], AggregatorStub, Dict[str, Any]) -> None - instance = common.FULL_CONFIG['instances'][0] - check = WarpstreamCheck('warpstream', {}, [instance]) - - with mock.patch('datadog_checks.base.utils.http.requests') as req: - print(status_code) - mock_resp = mock.MagicMock(status_code=status_code) - req.get.return_value = mock_resp - - check.check(None) - - aggregator.assert_metric('warpstream.can_connect', expected_healthy_value, count=1) - - aggregator.assert_all_metrics_covered() - aggregator.assert_metrics_using_metadata(get_metadata_metrics()) From e65fd7c9ef135dd2ff8736407a47d3ebf2755267 Mon Sep 17 00:00:00 2001 From: "dd-pub-platform[bot]" <157534740+dd-pub-platform[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 05:18:04 +0000 Subject: [PATCH 2/4] Update WarpStream integration --- warpstream/README.md | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/warpstream/README.md b/warpstream/README.md index a134f06e64..4c316f495a 100644 --- a/warpstream/README.md +++ b/warpstream/README.md @@ -8,35 +8,36 @@ WarpStream is a data streaming platform compatible with Apache Kafka®, designed ### Installation -[Install the Datadog Agent][1] version `>=6.17` or `>=7.17`. +1. [Download and launch the Datadog Agent][1]. +2. Manually install the WarpStream integration. See [Use Community Integrations][2] for more details based on the environment. ### Configuration -Complete all of the following steps to ensure the WarpStream integration works properly. +Complete the following steps to set up the WarpStream integration. -There are two parts of the WarpStream integration: +The WarpStream integration has two components: --   The **Datadog Agent** portion, which makes requests to a provided endpoint for the WarpStream agent to report whether it can connect and is healthy. +-   The **Datadog Agent** component, which makes requests to an endpoint to check whether WarpStream can connect and is healthy. --   The **WarpStream StatsD** portion, where the WarpStream Agent can be configured to send metrics to the Datadog Agent. +-   The **WarpStream StatsD** component, which you configure to send metrics to the Datadog Agent. -The WarpStream integration's [metrics][2] come from both the Agent and StatsD portions. +The WarpStream integration's [metrics][3] come from both the Agent and StatsD portions. -##### Configure Datadog Agent WarpStream integration +#### Configure the Datadog Agent WarpStream integration -Configure the WarpStream check included in the [Datadog Agent][3] package to collect health metrics and service checks. This can be done by editing the `url` within the `warpstream.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory, to start collecting your WarpStream service checks. See the [sample warpstream.d/conf.yaml][4] for all available configuration options. +Edit the `url` in `warpstream.d/conf.yaml`, in the `conf.d/` folder at the root of your Agent's configuration directory. See the [sample `warpstream.d/conf.yaml`][4] for all available configuration options. -Ensure that `url` matches your WarpStream Agent HTTP server (port 8080 by default). +The `url` value must match your WarpStream Agent HTTP server (port 8080 by default). ##### Connect WarpStream Agent to DogStatsD -Start the agent with the flag `-enableDatadogMetrics` or set the environment variable `WARPSTREAM_ENABLE_DATADOG_METRICS` to `true`. +Start the WarpStream Agent with the flag `-enableDatadogMetrics` or set the environment variable `WARPSTREAM_ENABLE_DATADOG_METRICS` to `true`. ##### Restart Datadog Agent and WarpStream 1. [Restart the Agent][5]. -2. Restart the WarpStream agent to start sending your WarpStream metrics to the Agent DogStatsD endpoint. +2. Restart the WarpStream Agent to start sending your WarpStream metrics to the Agent DogStatsD endpoint. ## Uninstallation @@ -52,8 +53,8 @@ Need help? Contact us through the following channels: -[1]: https://docs.datadoghq.com/developers/dogstatsd/ -[2]: https://github.com/warpstreamlabs/integrations-extras/tree/epot/tier/warpstream#metrics -[3]: https://app.datadoghq.com/account/settings/agent/latest +[1]: https://docs.datadoghq.com/containers/kubernetes/log/ +[2]: https://docs.datadoghq.com/agent/guide/community-integrations-installation-with-docker-agent +[3]: https://github.com/warpstreamlabs/integrations-extras/tree/epot/tier/warpstream#metrics [4]: https://github.com/DataDog/integrations-extras/blob/master/warpstream/datadog_checks/warpstream/data/conf.yaml.example -[5]: https://github.com/DataDog/integrations-extras/blob/master/warpstream/metadata.csv \ No newline at end of file +[5]: https://docs.datadoghq.com/agent/configuration/agent-commands/#start-stop-and-restart-the-agent \ No newline at end of file From d6c64c8dc5b5fd4cd2afad01f453792807ec5042 Mon Sep 17 00:00:00 2001 From: "dd-pub-platform[bot]" <157534740+dd-pub-platform[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 09:44:58 +0000 Subject: [PATCH 3/4] Update WarpStream integration From ba5d2785f6a6e621a179079a4825b6ca1d7364b0 Mon Sep 17 00:00:00 2001 From: "dd-pub-platform[bot]" <157534740+dd-pub-platform[bot]@users.noreply.github.com> Date: Tue, 12 May 2026 19:09:38 +0000 Subject: [PATCH 4/4] Update WarpStream integration --- warpstream/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/warpstream/README.md b/warpstream/README.md index 4c316f495a..bcc59c7798 100644 --- a/warpstream/README.md +++ b/warpstream/README.md @@ -8,7 +8,7 @@ WarpStream is a data streaming platform compatible with Apache Kafka®, designed ### Installation -1. [Download and launch the Datadog Agent][1]. +1. [Install the Datadog Agent][1]. 2. Manually install the WarpStream integration. See [Use Community Integrations][2] for more details based on the environment. ### Configuration @@ -53,7 +53,7 @@ Need help? Contact us through the following channels: -[1]: https://docs.datadoghq.com/containers/kubernetes/log/ +[1]: https://docs.datadoghq.com/getting_started/agent/ [2]: https://docs.datadoghq.com/agent/guide/community-integrations-installation-with-docker-agent [3]: https://github.com/warpstreamlabs/integrations-extras/tree/epot/tier/warpstream#metrics [4]: https://github.com/DataDog/integrations-extras/blob/master/warpstream/datadog_checks/warpstream/data/conf.yaml.example