Skip to content

Commit

Permalink
Add application tag
Browse files Browse the repository at this point in the history
Add application tag for monitoring
Remove LongRunningRequestFilter.java
Update yarn and yarn.lock in cli and webui
  • Loading branch information
amvanbaren committed Feb 6, 2024
1 parent 485c96f commit 214f4e1
Show file tree
Hide file tree
Showing 14 changed files with 2,771 additions and 2,955 deletions.
893 changes: 0 additions & 893 deletions cli/.yarn/releases/yarn-4.0.0.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions cli/.yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cli/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.0.cjs
yarnPath: .yarn/releases/yarn-4.1.0.cjs
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@
"publish:next": "yarn npm publish --tag next",
"publish:latest": "yarn npm publish --tag latest"
},
"packageManager": "yarn@4.0.0"
"packageManager": "yarn@4.1.0"
}
632 changes: 316 additions & 316 deletions cli/yarn.lock

Large diffs are not rendered by default.

17 changes: 6 additions & 11 deletions server/src/main/java/org/eclipse/openvsx/RegistryApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
import io.micrometer.core.aop.TimedAspect;
import io.micrometer.core.instrument.MeterRegistry;
import org.eclipse.openvsx.mirror.ReadOnlyRequestFilter;
import org.eclipse.openvsx.web.LongRunningRequestFilter;
import org.eclipse.openvsx.web.ShallowEtagHeaderFilter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
Expand Down Expand Up @@ -61,16 +61,6 @@ public FilterRegistrationBean<ShallowEtagHeaderFilter> shallowEtagHeaderFilter()
return registrationBean;
}

@Bean
@ConditionalOnProperty(value = "ovsx.request.duration.threshold")
public FilterRegistrationBean<LongRunningRequestFilter> longRunningRequestFilter(@Value("${ovsx.request.duration.threshold}") long threshold) {
var registrationBean = new FilterRegistrationBean<LongRunningRequestFilter>();
registrationBean.setFilter(new LongRunningRequestFilter(threshold));
registrationBean.setOrder(Ordered.LOWEST_PRECEDENCE);

return registrationBean;
}

@Bean
public RequestRejectedHandler requestRejectedHandler() {
return new HttpStatusRequestRejectedHandler();
Expand All @@ -86,4 +76,9 @@ public FilterRegistrationBean<ReadOnlyRequestFilter> readOnlyRequestFilter(

return registrationBean;
}

@Bean
public MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
return registry -> registry.config().commonTags("application", "openvsx-server");
}
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 214f4e1

Please sign in to comment.