Skip to content

Commit

Permalink
Fix metric name for e2e test (#5985)
Browse files Browse the repository at this point in the history
* Add log pattern condition and fix metric name for e2e

* remove incorrect metric from comments

* fix style
  • Loading branch information
ChristineTChen authored Mar 6, 2020
1 parent 60afcd1 commit d57710e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kafka/datadog_checks/kafka/data/conf.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ init_config:
attribute:
Value:
metric_type: gauge
alias: kafka.net.handler.avg.idle.pct.rate
alias: kafka.net.processor.avg.idle.pct.rate
- include:
domain: 'kafka.server'
bean: 'kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent'
Expand Down
2 changes: 1 addition & 1 deletion kafka/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"""

KAFKA_E2E_METRICS = [
"kafka.net.handler.avg.idle.pct.rate",
"kafka.net.processor.avg.idle.pct.rate",
# Request metrics:
"kafka.request.channel.queue.size",
"kafka.request.fetch_consumer.time.99percentile",
Expand Down
7 changes: 6 additions & 1 deletion kafka/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
import pytest

from datadog_checks.dev import docker_run
from datadog_checks.dev.conditions import CheckDockerLogs
from datadog_checks.dev.utils import load_jmx_config

from .common import HERE


@pytest.fixture(scope='session')
def dd_environment():
with docker_run(os.path.join(HERE, 'compose', 'docker-compose.yml')):
compose_file = os.path.join(HERE, 'compose', 'docker-compose.yml')

with docker_run(
compose_file, conditions=[CheckDockerLogs(compose_file, [r'\[KafkaServer id=\d+\] started'], matches="all")]
):
yield load_jmx_config(), {'use_jmx': True}

0 comments on commit d57710e

Please sign in to comment.