micrometer-metrics/micrometer

StatsdMeterRegistry doesn't renew resolved ip address on DNS change

Open

#1,252 创建于 2019年2月27日

在 GitHub 查看
 (15 评论) (2 反应) (0 负责人)Java (935 fork)batch import
enhancementhelp wantedregistry: statsd

仓库指标

Star
 (4,220 star)
PR 合并指标
 (平均合并 1天 21小时) (30 天内合并 100 个 PR)

描述

Hello everyone.

I've faced with the problem that StatsdMeterRegistry doesn't aware of DNS changes after it was start()ed. As a result, metrics aren't delivered to Telegraf and there is no warning or so in logs.

How to reproduce:

  1. Create record in /etc/hosts file, e.g.: 127.0.0.1 telegraf.kube-system.svc.cluster.local.
  2. Start application with StatsdMeterRegistry enabled and use host described above.
  3. Change record in /etc/hosts file to another ip (127.0.0.2 for example)

Actual result: Using wireshark/tcpdump you can see that all metrics are being sent to 127.0.0.1 even after step 3.

Expected result: StatsdMeterRegistry respect DNS name change.

Can be reproduced on real network/DNS server. Security manager disabled. Micrometer version: 1.1.3, reproducible on 1.0.7 as well.

贡献者指南