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:27:54 UTC

[GitHub] [skywalking] wu-sheng commented on a diff in pull request #9741: Limit the max length of trace and log tag's `key=value`

wu-sheng commented on code in PR #9741:
URL: https://github.com/apache/skywalking/pull/9741#discussion_r990604771


##########
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:
   Warning logs seem a little tricky. Because this kind of log would not disappear unless the user changes business codes or plugin codes. And the warning would not stop and then they would crash the log collecting system. 
   I think that is not what we expected.



-- 
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