Sampling and blocking requests
Last updated
htSdk.setSamplingConfig({
http: [
{
path: '/user/signup',
method: '*',
coolOffPeriodMs: 10 * 1000,
maxResponseTimeMs: 5000,
}
]
})htSdk.setSamplingConfig({
http: [
{
path: '/user/signup',
method: '*',
samplingRate: 0.65,
}
]
})htSdk.setSamplingConfig({
http: [
{
path: '/user/signup',
samplingRate: 1,
coolOffPeriodMs: 10 * 1000,
maxResponseTimeMs: 5000,
},
{
path: '*',
coolOffPeriodMs: 10 * 1000,
maxResponseTimeMs: 5000,
useAdaptiveSampling: true,
}
],
grpc: [
{
service: 'Service1.greeter',
method: 'SayHello',
coolOffPeriodMs: 10 * 1000,
maxResponseTimeMs: 5000
}
]
});{
path: '*',
method: '*',
samplingRate: 1,
maxResponseTimeMs: 10 * 1000,
coolOffPeriodMs: 60 * 1000
}htSdk.setBlockRequestsConfig({
http: [
{
path: '/sampling/blocking'
},
{
path: '/test/blocking',
method: '*'
},
{
path: /sampling\/blocking/,
method: 'put'
},
{
path: '/sampling/:id'
},
{
path: '/sampling/{id}'
}
],
grpc: [
{
service: 'helloworld.Greeter',
method: '*'
}
]
})