-
Notifications
You must be signed in to change notification settings - Fork 303
Create metric: appsec.waf.input_truncated #8375
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package datadog.trace.api.telemetry; | ||
|
||
public enum TruncatedType { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed offline, this is pretty much redundant with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The final decision has been the removal of |
||
STRING_TOO_LONG(1), | ||
LIST_MAP_TOO_LARGE(2), | ||
OBJECT_TOO_DEEP(4); | ||
|
||
private final int value; | ||
private static final int numValues = RuleType.values().length; | ||
|
||
TruncatedType(int value) { | ||
this.value = value; | ||
} | ||
|
||
public int getValue() { | ||
return this.value; | ||
} | ||
|
||
public static int getNumValues() { | ||
return numValues; | ||
} | ||
} |
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.
Don't call these when the counters are 0. It'll try to increment the atomic counters by 0 and it's all pointless.
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.
Changed to only add when is greater than 0