
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
github.com/honeycombio/dynsampler-go
Dynsampler is a golang library for doing dynamic sampling of traffic before sending it on to Honeycomb (or another analytics system) It contains several sampling algorithms to help you select a representative set of events instead of a full stream.
A "sample rate" of 100 means that for every 100 requests, we capture a single event and indicate that it represents 100 similar requests.
For full documentation, look at the official documentation.
For more information about using Honeycomb, see our docs.
This package is intended to help sample a stream of tracking events, where events are typically created in response to a stream of traffic (for the purposes of logging or debugging). In general, sampling is used to reduce the total volume of events necessary to represent the stream of traffic in a meaningful way.
There are a variety of available techniques for reducing a high-volume stream of incoming events to a lower-volume, more manageable stream of events. Depending on the shape of your traffic, one may serve better than another, or you may need to write a new one! Please consider contributing it back to this package if you do.
Static
sampling to use a constant sample rate.Static
sampling and override sample rates on a per-key basis (e.g. if you know want to sample HTTP 200/OK
events at a different rate from HTTP 503/Server Error
).TotalThroughput
, which will calculate sample rates based on keeping the entire system's representative event throughput right around (or under) particular cap.WindowedThroughput
.PerKeyThroughput
, which will calculate sample rates based on keeping the event throughput roughly constant per key/partition (e.g. per user id)AvgSampleRateWithMin
- it will increase the sample rate of higher volume traffic proportionally to the logarithm of the specific key's volume. If total traffic falls below a configured minimum, it stops sampling to avoid any sampling when the traffic is too low to warrant it.EMASampleRate
works like AvgSampleRate
, but calculates sample rates based on a moving average (Exponential Moving Average) of many measurement intervals rather than a single isolated interval. In addition, it can detect large bursts in traffic and will trigger a recalculation of sample rates before the regular interval.EMAThroughput
. It will adjust sample rates across a key space to achieve a given throughput while still ensuring that all keys are represented.FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.