未验证 提交 17abef4c 编写于 作者: J Jared Tan 提交者: GitHub

polish debug logging avoid null value when segment be ignored. (#7070)

* polish debug logging avoid null value.

* update CHANGES.md.
上级 56f2e86a
......@@ -61,6 +61,7 @@ Release Notes.
* Make metrics exporter still work even when storage layer failed.
* Fix Jetty HTTP `TRACE` issue, disable HTTP methods except `POST`.
* CVE: upgrade snakeyaml to prevent [billion laughs attack](https://en.wikipedia.org/wiki/Billion_laughs#Variations) in dynamic configuration.
* polish debug logging avoids null value when the segment ignored.
#### UI
* Add logo for kong plugin.
......
......@@ -170,14 +170,17 @@ public class SegmentAnalysisListener implements FirstAnalysisListener, EntryAnal
@Override
public void build() {
if (log.isDebugEnabled()) {
log.debug("segment listener build, segment id: {}", segment.getSegmentId());
}
if (sampleStatus.equals(SAMPLE_STATUS.IGNORE)) {
if (log.isDebugEnabled()) {
log.debug("segment ignored, trace id: {}", segment.getTraceId());
}
return;
}
if (log.isDebugEnabled()) {
log.debug("segment listener build, segment id: {}", segment.getSegmentId());
}
segment.setEndpointId(endpointId);
segment.setEndpointName(endpointName);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册