Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzxu-crm committed Aug 31, 2024
1 parent 71607f4 commit 5f894ce
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,12 @@ public Metric createLeafMetric( String name )
return null;
}

if (name != null && name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("createLeafMetric aggregated metric " + name);
log.warn("============");
}

Metric m = getMetric( name );
if ( m == null )
{
Expand All @@ -930,6 +936,11 @@ public Metric createLeafMetric( String name )
m = getMetric( name );
if ( m == null )
{
if (name != null && name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("insert aggregated metric " + name);
log.warn("============");
}
m = insert( name );
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,49 +297,18 @@ public int put( DataPoints points )
try {
for (int i = 0, n = points.size(); i < n; i++) {
DataPoint p = points.get(i);
if (p.name != null && p.name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && p.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("Received aggregated metric " + p.name);
log.warn(p.toString());
log.warn("============");
}
if (!p.isValid()) {
if (p.name != null && p.name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && p.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("Invalid aggregated metric " + p.name);
log.warn(p.toString());
log.warn("============");
}
continue;
}

if (!p.hasMetricId()) {
if (p.name != null && p.name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && p.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("No metric ID aggregated metric " + p.name);
log.warn(p.toString());
log.warn("============");
}
continue;
}

if (!isWithinRetentionPeriod(p, now)) {
if (p.name != null && p.name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && p.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("Outside retention period aggregated metric " + p.name);
log.warn(p + " " + now);
log.warn("============");
}
continue;
}

if (p.name != null && p.name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && p.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("Valid aggregated metric " + p.name);
log.warn(p.toString());
log.warn("============");
}

Metric m = points.getMetric(i);
RetentionPolicy pointPolicy = points.getPolicy(i);
if (m == null || pointPolicy == null) {
Expand All @@ -355,12 +324,6 @@ public int put( DataPoints points )
int interval = policy.interval(p.ts);
byte[] key = DataPointRecord.toKeyBytes(p.metricId, interval, longId);
byte[] value = DataPointRecord.toValueBytes(p.val);
if (p.name != null && p.name.startsWith("pod222.ecom_ag.bjmr.bjmr_prd") && p.name.endsWith("number-of-filters.max")) {
log.warn("============");
log.warn("Put aggregated metric " + p.name);
log.warn(p.toString());
log.warn("============");
}
batch.put(key, value);
String namespace = nameUtils.firstSegment(p.name);
if (!latencyByNamespaceMap.containsKey(namespace)) {
Expand Down

0 comments on commit 5f894ce

Please sign in to comment.