You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/10/08 07:21:19 UTC
[GitHub] [skywalking] kezhenxu94 commented on a diff in pull request #9741: Limit the max length of trace and log tag's `key=value`
kezhenxu94 commented on code in PR #9741:
URL: https://github.com/apache/skywalking/pull/9741#discussion_r990604111
##########
oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/parser/listener/SegmentAnalysisListener.java:
##########
@@ -152,6 +152,12 @@ private void appendSearchableTags(SpanObject span) {
span.getTagsList().forEach(tag -> {
if (searchableTagKeys.contains(tag.getKey())) {
final Tag spanTag = new Tag(tag.getKey(), tag.getValue());
+ if (tag.getValue().length() > Tag.TAG_LENGTH || spanTag.toString().length() > Tag.TAG_LENGTH) {
+ if (log.isDebugEnabled()) {
+ log.debug("Segment tag : {} length > : {}, dropped", spanTag, Tag.TAG_LENGTH);
Review Comment:
I think we should `warn` this, if users can't find search results for those tags, they should be notified that those are dropped instead of thinking there is no such tag at all, otherwise it's hard to diagnose why there is no result in the UI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org