Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4aa78d3
adding projection functionality, rethink automic double
harsimar Dec 10, 2024
bf15276
atomic double and some other changes
harsimar Dec 11, 2024
4ace19d
merge from master to get p3 changes
harsimar Dec 11, 2024
75718c7
pr comments and some build stuff
harsimar Dec 11, 2024
27d4979
changing guava version
harsimar Dec 11, 2024
619bb47
spotbug fix
harsimar Dec 11, 2024
915d579
starting to add tests
harsimar Dec 12, 2024
9c8fa37
added unit tests for derived metric projection
harsimar Dec 13, 2024
e3377d7
fix conflict from main
harsimar Dec 13, 2024
c599211
reorganize tests
harsimar Dec 13, 2024
a6ab936
fixing inconsistency with main re okio
harsimar Dec 13, 2024
494a1b9
pr comments & small refactorings
harsimar Dec 16, 2024
1351d2b
remove logging, spotless
harsimar Dec 16, 2024
a77adfe
validator
harsimar Dec 17, 2024
68b9c83
minor
harsimar Dec 17, 2024
d80053e
changes to concurrency handling
harsimar Dec 17, 2024
f83c116
moving synchronization to derivedMetricAggregation
harsimar Dec 17, 2024
d8b618f
moving derivedMetricAggregation to its own file
harsimar Dec 17, 2024
77f176a
merge projection into here
harsimar Dec 18, 2024
96e705f
validator round 1 - need to refactor for validator to store errors
harsimar Dec 18, 2024
6e81b55
finish implementation and starting to add tests
harsimar Dec 19, 2024
568f059
merge from main
harsimar Dec 19, 2024
de6bd93
spotless
harsimar Dec 20, 2024
f492237
remove unused classes
harsimar Dec 20, 2024
191783d
pr comments
harsimar Jan 6, 2025
c3c3c49
fix ci errors
harsimar Jan 6, 2025
0ee6032
initial implementation
harsimar Jan 7, 2025
73f4cc7
merge conflicts and starting to add some logging
harsimar Jan 8, 2025
0c5aae9
logging and testing
harsimar Jan 9, 2025
f1ba015
restructure of error tracking in validator
harsimar Jan 10, 2025
76d8577
pr comments
harsimar Jan 10, 2025
0555332
minor
harsimar Jan 10, 2025
648bc10
some pr comments
harsimar Jan 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge from main
  • Loading branch information
harsimar committed Dec 19, 2024
commit 568f059711dfb6c7f04f5e51befdeebb3307013b
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ public boolean matchesCustomDimFilter(FilterInfo filter, String trimmedFieldName
}

public double getCustomDimValueForProjection(String key) {
double result = Double.NaN;
if (customDimensions.containsKey(key)) {
String value = customDimensions.get(key);
try {
result = Double.parseDouble(value);
return Double.parseDouble(value);
} catch (NumberFormatException e) {
return result;

}
}
return result;
return Double.NaN;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ void update(double incrementBy) {
synchronized (lock) {
if (count == 0) {
return 0.0;
} else if (aggregationType.equals(AggregationType.AVG)) {

}
if (aggregationType.equals(AggregationType.AVG)) {
return aggregation / count;
} else {
return aggregation;
}
return aggregation;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void calculateProjection(DerivedMetricInfo derivedMetricInfo, TelemetryCo
long duration = columns.getFieldValue(KnownRequestColumns.DURATION, Long.class);
// in case duration from telemetrycolumns doesn't parse correctly.
// also quickpulse expects duration derived metrics to be reported in millis.
incrementBy = duration != -1 ? (double) duration / 1000.0 : Double.NaN;
incrementBy = duration == -1 ? Double.NaN : (double) duration / 1000.0;
} else if (derivedMetricInfo.getProjection().startsWith(Filter.CUSTOM_DIM_FIELDNAME_PREFIX)) {
String customDimKey
= derivedMetricInfo.getProjection().substring(Filter.CUSTOM_DIM_FIELDNAME_PREFIX.length());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
// Licensed under the MIT License.
package com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.filtering;

import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.*;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.DerivedMetricInfo;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.FilterConjunctionGroupInfo;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.CollectionConfigurationInfo;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.DocumentStreamInfo;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.DocumentFilterConjunctionGroupInfo;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.AggregationType;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.TelemetryType;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse.swagger.models.CollectionConfigurationErrorType;

import java.util.Set;
import java.util.List;
Expand Down Expand Up @@ -134,14 +141,4 @@ private Map<String, AggregationType> initValidProjectionInfo() {
return result;
}

private Map<String, AggregationType> initValidProjectionInfo() {
Map<String, AggregationType> result = new HashMap<>();
for (List<DerivedMetricInfo> derivedMetricInfoList : validDerivedMetricInfos.values()) {
for (DerivedMetricInfo derivedMetricInfo : derivedMetricInfoList) {
result.put(derivedMetricInfo.getId(), derivedMetricInfo.getAggregation());
}
}
return result;
}

}
You are viewing a condensed version of this merge commit. You can view the full changes here.