Skip to content

Commit

Permalink
Merge branch 'main' into ayangster/new-ipc-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
annieyang committed Jan 16, 2025
2 parents b59978a + 10d19b6 commit 2b19bf1
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 23 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
id 'com.github.spotbugs' version '5.2.5' apply false
id "com.github.johnrengelman.shadow" version "8.1.1" apply false
id 'me.champeau.jmh' version '0.7.2'
id 'com.netflix.nebula.dependency-recommender' version '12.5.0'
id 'com.netflix.nebula.dependency-recommender' version '12.5.1'
id 'com.netflix.nebula.netflixoss' version '11.5.0'
// Need to override as transitive from netflixoss has git.user error
id 'com.netflix.nebula.release' version '19.0.10'
Expand Down
28 changes: 14 additions & 14 deletions dependencies.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Auto generated by insight-recommendations build
com.amazonaws:aws-java-sdk-core = 1.12.777
com.amazonaws:aws-java-sdk-cloudwatch = 1.12.777
com.fasterxml.jackson.core:jackson-core = 2.18.1
com.fasterxml.jackson.core:jackson-databind = 2.18.1
com.fasterxml.jackson.dataformat:jackson-dataformat-smile = 2.18.1
com.amazonaws:aws-java-sdk-core = 1.12.780
com.amazonaws:aws-java-sdk-cloudwatch = 1.12.780
com.fasterxml.jackson.core:jackson-core = 2.18.2
com.fasterxml.jackson.core:jackson-databind = 2.18.2
com.fasterxml.jackson.dataformat:jackson-dataformat-smile = 2.18.2
com.github.ben-manes.caffeine:caffeine = 2.9.3
com.google.inject.extensions:guice-servlet = 5.1.0
com.google.inject:guice = 5.1.0
Expand All @@ -16,19 +16,19 @@ com.netflix.governator:governator-core = 1.17.13
com.netflix.servo:servo-core = 0.13.2
com.typesafe:config = 1.4.3
io.dropwizard.metrics5:metrics-core = 5.0.0-rc20 # 5.0.0 is a bad version do not use
io.micrometer:micrometer-core = 1.14.0
io.micrometer:micrometer-core = 1.14.2
javax.inject:javax.inject = 1
net.openhft:zero-allocation-hashing = 0.16
nl.jqno.equalsverifier:equalsverifier = 3.17.3
org.apache.logging.log4j:log4j-api = 2.24.1
org.apache.logging.log4j:log4j-core = 2.24.1
org.apache.logging.log4j:log4j-jcl = 2.24.1
org.apache.logging.log4j:log4j-jul = 2.24.1
org.apache.logging.log4j:log4j-slf4j-impl = 2.24.1
org.apache.logging.log4j:log4j-api = 2.24.3
org.apache.logging.log4j:log4j-core = 2.24.3
org.apache.logging.log4j:log4j-jcl = 2.24.3
org.apache.logging.log4j:log4j-jul = 2.24.3
org.apache.logging.log4j:log4j-slf4j-impl = 2.24.3
org.hsqldb:hsqldb = 2.7.3
org.junit.jupiter:junit-jupiter-engine = 5.11.3
org.junit.jupiter:junit-jupiter-engine = 5.11.4
org.slf4j:slf4j-api = 1.7.36
org.slf4j:slf4j-nop = 1.7.36
org.slf4j:slf4j-simple = 1.7.36
software.amazon.awssdk:aws-core = 2.29.11
software.amazon.awssdk:sdk-core = 2.29.11
software.amazon.awssdk:aws-core = 2.29.45
software.amazon.awssdk:sdk-core = 2.29.45
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,21 @@ public SpectatorRequestMetricCollector(Registry registry, Map<String, String> cu
this.customTags = new HashMap<>();
customTags.forEach((key, value) -> {
if (ALL_DEFAULT_TAGS.contains(key)) {
registry.propagate(new IllegalArgumentException("Invalid custom tag " + key
+ " - cannot override built-in tag"));
registry.propagate(new IllegalArgumentException(
"Invalid custom tag " + key + " - cannot override built-in tag"));
} else if (value == null) {
registry.propagate(new NullPointerException(
"Custom tag value for key " + key + " is null"));
} else {
this.customTags.put(key, value);
}
});
Preconditions.checkNotNull(handlerContextKey, "handlerContextKey");
this.handlerContextKey = handlerContextKey;
if (ALL_DEFAULT_TAGS.contains(this.handlerContextKey.getName())) {
registry.propagate(new IllegalArgumentException("Invalid handler context key "
+ this.handlerContextKey.getName()
+ " - cannot override built-in tag"));
final String keyName = this.handlerContextKey.getName();
if (ALL_DEFAULT_TAGS.contains(keyName)) {
registry.propagate(new IllegalArgumentException(
"Invalid handler context key " + keyName + " - cannot override built-in tag"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ public void testCustomTags_overrideDefault() {
new SpectatorRequestMetricCollector(new DefaultRegistry(Clock.SYSTEM, config), customTags));
}

@Test
public void testCustomTagsNull() {
Map<String, String> customTags = new HashMap<>();
customTags.put("tagname", null);
collector = new SpectatorRequestMetricCollector(registry, customTags);
execRequest("http://monitoring", 503);
assertEquals(set(), valueSet("tagname"));
}

@Test
public void testHandlerContextKey() {
String contextKeyName = "myContextKey";
Expand Down
2 changes: 1 addition & 1 deletion spectator-ext-log4j1/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
api project(':spectator-api')
api "ch.qos.reload4j:reload4j:1.2.25"
api "ch.qos.reload4j:reload4j:1.2.26"
}

jar {
Expand Down

0 comments on commit 2b19bf1

Please sign in to comment.