Skip to content

//misk/misk.web.interceptors

Package-level declarations

Types

Name Summary
ActionLoggingConfig [jvm]
data class ActionLoggingConfig@JvmOverloadsconstructor(val ratePerSecond: Long = 10, val errorRatePerSecond: Long = 0, val bodySampling: Double = 0.0, val errorBodySampling: Double = 0.0, val excludedEnvironments: List<String> = listOf(), val requestLoggingMode: RequestLoggingMode = RequestLoggingMode.ALL)
This class should have all the same config options as LogRequestResponse. See that class for details.
BeforeContentEncoding [jvm]
@Qualifier
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD, AnnotationTarget.TYPE])
annotation class BeforeContentEncoding
Denotes a target to be in the first order of execution before any content decoding happens. A NetworkInterceptor bound with BeforeContentEncoding is automatically installed before interceptors annotated with ForContentEncoding.
InternalErrorInterceptorFactory [jvm]
@Singleton
class InternalErrorInterceptorFactory@Injectconstructor : NetworkInterceptor.Factory
LogRateLimiter [jvm]
@Singleton
class LogRateLimiter@Injectconstructor(rateLimiterFactory: RateLimiter.Factory)
Holds rate limiters for logging success and error responses. There is a rate limiter for every action and service that calls it, for both success and error. The rate limiters are created according to the value set in LogRequestResponse annotation.
MiskConcurrencyLimiterFeature [jvm]
interface MiskConcurrencyLimiterFeature
Interface for a Feature flag that can dynamically enable/disable the concurrency limiter
RebalancingInterceptor [jvm]
class RebalancingInterceptor@Injectconstructor(random: ThreadLocalRandom, probability: Double) : NetworkInterceptor
When we’re deploying and redeploying our pods, we want to make sure that clients rebalance onto the new pods. This randomly closes connections so they will be recreated, naturally balancing connections across pods.
RequestBodyLoggingInterceptor [jvm]
class RequestBodyLoggingInterceptor : ApplicationInterceptor
Stores request and response information for an action in a ThreadLocal, to be logged in RequestLoggingInterceptor
RequestLoggingConfig [jvm]
data class RequestLoggingConfig(val actions: Map<String, ActionLoggingConfig>)
A set of per-action logging config overrides.
RequestLoggingInterceptor [jvm]
class RequestLoggingInterceptor : NetworkInterceptor
Logs request and response information for an action. Timing information doesn’t count time writing the response to the remote client.
RequestLoggingTransformer [jvm]
interface RequestLoggingTransformer
Transforms request and/or response bodies before they get logged by RequestLoggingInterceptor. Useful for things like stripping out noisy data.
RequestResponseBody [jvm]
data class RequestResponseBody@JvmOverloadsconstructor(val request: Any?, val response: Any?, val requestHeaders: Any? = null, val responseHeaders: Any? = null)
ResponseBodyMarshallerFactory [jvm]
@Singleton
class ResponseBodyMarshallerFactory
WideOpenDevelopmentInterceptor [jvm]
class WideOpenDevelopmentInterceptor@Injectconstructor : NetworkInterceptor
WideOpenDevelopmentInterceptorFactory [jvm]
class WideOpenDevelopmentInterceptorFactory@Injectconstructor(wideOpenDevelopmentInterceptor: WideOpenDevelopmentInterceptor, deployment: Deployment) : NetworkInterceptor.Factory

Functions

Name Summary
tryTransform [jvm]
fun RequestLoggingTransformer.tryTransform(requestResponseBody: RequestResponseBody?): RequestResponseBody?