Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 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
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
remove logging, spotless
  • Loading branch information
harsimar committed Dec 16, 2024
commit 1351d2baf1ba4b4617a9787d0fb8764faafa6e69
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

package com.azure.monitor.opentelemetry.autoconfigure.implementation.quickpulse;

import com.azure.core.util.logging.ClientLogger;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.models.MonitorDomain;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.models.RemoteDependencyData;
import com.azure.monitor.opentelemetry.autoconfigure.implementation.models.RequestData;
Expand Down Expand Up @@ -33,7 +32,6 @@
import com.azure.monitor.opentelemetry.autoconfigure.implementation.utils.CpuPerformanceCounterCalculator;
import reactor.util.annotation.Nullable;

import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryUsage;
Expand Down Expand Up @@ -61,8 +59,6 @@ final class QuickPulseDataCollector {

private volatile Supplier<String> instrumentationKeySupplier;

private static final ClientLogger logger = new ClientLogger(QuickPulseDataCollector.class);

// TODO (harskaur): Track projection (runtime) related errors in future PR
private final AtomicReference<FilteringConfiguration> configuration;

Expand Down Expand Up @@ -181,15 +177,7 @@ private boolean matchesDocumentFilters(TelemetryColumns columns, TelemetryType t

private void applyMetricFilters(TelemetryColumns columns, TelemetryType telemetryType,
FilteringConfiguration currentConfig, Counters currentCounters) {
// TODO (harskaur): when this PR is merged, remove logging (it is for manual testing & making sure the build does not complain about useless methods)
List<DerivedMetricInfo> metricsConfig = currentConfig.fetchMetricConfigForTelemetryType(telemetryType);
try {
for (DerivedMetricInfo dmi : metricsConfig) {
logger.verbose(dmi.toJsonString());
}
} catch (IOException e) {
logger.error(e.getMessage());
}
for (DerivedMetricInfo derivedMetricInfo : metricsConfig) {
if (Filter.checkMetricFilters(derivedMetricInfo, columns)) {
synchronized (currentCounters.derivedMetrics) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class DerivedMetricProjectionsTest {
public static final String TRACE = "Trace";

private DerivedMetricInfo createDerivedMetricInfoWithEmptyFilters(String id, String telemetryType,
AggregationType agg, AggregationType backendAgg, String projection) {
AggregationType agg, AggregationType backendAgg, String projection) {
DerivedMetricInfo result = new DerivedMetricInfo();
result.setId(id);
result.setTelemetryType(telemetryType);
Expand All @@ -47,17 +47,17 @@ void testCountProjection() {
String exceptionId = "id-for-exception";
String traceId = "id-for-trace";

DerivedMetricInfo dmiRequest = createDerivedMetricInfoWithEmptyFilters(requestId, REQUEST,
AggregationType.SUM, AggregationType.SUM, DerivedMetricProjections.COUNT);
DerivedMetricInfo dmiRequest = createDerivedMetricInfoWithEmptyFilters(requestId, REQUEST, AggregationType.SUM,
AggregationType.SUM, DerivedMetricProjections.COUNT);

DerivedMetricInfo dmiDep = createDerivedMetricInfoWithEmptyFilters(dependencyId, DEPENDENCY,
AggregationType.SUM, AggregationType.SUM, DerivedMetricProjections.COUNT);

DerivedMetricInfo dmiException = createDerivedMetricInfoWithEmptyFilters(exceptionId, EXCEPTION,
AggregationType.SUM, AggregationType.SUM, DerivedMetricProjections.COUNT);

DerivedMetricInfo dmiTrace = createDerivedMetricInfoWithEmptyFilters(traceId, TRACE,
AggregationType.SUM, AggregationType.SUM, DerivedMetricProjections.COUNT);
DerivedMetricInfo dmiTrace = createDerivedMetricInfoWithEmptyFilters(traceId, TRACE, AggregationType.SUM,
AggregationType.SUM, DerivedMetricProjections.COUNT);

RequestDataColumns request = new RequestDataColumns("https://test.com/hiThere", 200000L, 200, true,
"GET /hiThere", new HashMap<>(), new HashMap<>());
Expand Down
Loading