Skip to content

[Feature] agent的定时加载配置任务是否可以不上报tags数据? #583

@betagooo

Description

@betagooo

Is there an existing issue for this?

  • I had searched in the issues and found no similar issues.

Description

89938ee486f7c4045b5e2bc244675d11
我在服务启动时候限制了生产环境不允许回放。在回放时候根据arex.disable.replay=true筛选出可回放的实例。但是发现过一段时间后,systemProperties数据会被重置为tags数据,从而无法筛选出我要的数据。

Solution

定时加载任务会覆盖掉systemProperties。
代码位置:io.arex.foundation.services.ConfigService#buildConfigQueryRequest。
tags和systemPropertis 只会在START阶段读取解析, 后面没地方可以修改和重新加载的逻辑,是不是不上报覆盖也行。

还有个想法,自定义插件能够提供个更新tags或者systemProperties 的接口?现在只能在启动阶段固定这些参数,有些情况下是在应用启动完毕才有的业务数据。比如有些服务在启动前是动态生成服务端口的,然后上报到对应的注册中心提供服务发现。如果要回放,还需要先到服务注册管理后台查询对应的端口才能回放。 我现在是增加了自定义插件,在服务中心注册完毕后将ip和端口set到System.properties,然后在agentStatusReport定时任务中将这个数据给到arex-storage中存储。

Related issues

No response

Are you willing to submit a pull request to implement this on your own?

  • Yes I am willing to submit a pull request on my own!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions