-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add-http_response 添加trace数据 #1133
Conversation
var labels map[string]string | ||
if ins.Trace != nil && *ins.Trace { | ||
traceid := uuid.New().String() | ||
labels = map[string]string{"target": target, "traceid": traceid} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
traceid不建议添加到label,对于时序指标来说不是稳态
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
主要考虑是将同一个请求通过traceid给关联到一起,至于稳态不太理解。能否解释下。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
比如每10秒拨测一次。 这样这个十秒和下一个十秒的指标 label不同,这样的指标会造成tsdb的存储压力
// request | ||
DNSDone: func(info httptrace.DNSDoneInfo) { | ||
dns_time = time.Now() | ||
fields["dns_time"] = time.Since(start).Seconds() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
时间可以都修改为按照毫秒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个插件原有指标也可以修改为毫秒吗,如http_response_response_time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以改,为了兼容老的用户告警,最好新增一个 xxx_time_ms 指标
已重新提交 |
Thank you @fedocx |
v0.4.2 版本已发布 |
#659