背景

SkyWalking agent 会采集所有支持的数据,但平台或技术框架本身存在的 health checkheartbeat定期轮询 等机制会产生大量无意义数据,这个采样点需要进行忽略。

以Spring Cloud 举几个例子:

  • 服务向注册中心发送“心跳”、定期获取注册的服务列表等,/eureka/** 均可忽略
  • 应用健康检查机制,如 /health 接口
  • 数据库维持连接机制,如MySQL 定期执行 select 1
  • Spring Cloud 本身大量的MQ通讯
  • 向配置中心定期拉取配置

使用方式

忽略指定后缀

Java Agent 提供了标准的 agent.ignore_suffix 配置,可忽略特定后缀的采样。

例如以环境变量配置的方式忽略 health 结尾的Endpoint,多项配置间以逗号隔开

  1. SW_AGENT_IGNORE_SUFFIX: health

匹配 Ant Path 规则

可选插件 apm-trace-ignore-plugin 提供了更灵活的配置,支持 Ant Path 规则,如:/path/*/path/**/path/?

使用方式

将 apm-trace-ignore-plugin-x.jar 包从 /agent/optional-plugins/apm-trace-ignore-plugin 移动到 /agent/plugins 即可。

以忽略 eureka 为例,配置JVM参数,多项配置以逗号分隔:

  1. -Dskywalking.trace.ignore_path=/eureka/**
  1. I wanted to put you the tiny remark to be able to say thanks a lot over again on the pleasing strategies you have provided in this case. It was really shockingly open-handed with you to make publicly precisely what many of us would’ve offered for an ebook to get some money for themselves, notably now that you might have tried it in case you desired. These smart ideas in addition served to be the good way to know that someone else have the same passion similar to my very own to see somewhat more with reference to this problem. I know there are some more pleasurable situations up front for people who see your website.

  2. I enjoy you because of all of your efforts on this site. Ellie enjoys doing internet research and it’s easy to see why. All of us hear all concerning the compelling manner you deliver functional ideas by means of the blog and as well cause contribution from other people about this concept plus my daughter is being taught a lot. Enjoy the remaining portion of the new year. You’re the one carrying out a first class job.

  3. My spouse and i felt now fulfilled that Ervin could deal with his investigations out of the ideas he got out of the web page. It’s not at all simplistic to just choose to be giving freely instructions that many other folks have been selling. And we also fully grasp we have the website owner to be grateful to for that. The entire explanations you have made, the simple site menu, the friendships you can give support to engender – it’s got everything fantastic, and it’s really facilitating our son and the family feel that the issue is entertaining, and that is particularly indispensable. Thank you for all the pieces!

  4. My spouse and i have been really lucky that Louis managed to finish off his research through your precious recommendations he made through your web pages. It is now and again perplexing to just find yourself handing out solutions which people today may have been selling. Therefore we know we need the writer to give thanks to for that. The specific illustrations you have made, the simple web site navigation, the relationships you will help to instill – it’s got most powerful, and it’s really leading our son in addition to the family reason why the subject is fun, which is really pressing. Thank you for the whole lot!

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注