![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@shopify/statsd
Advanced tools
An opinionated StatsD client for Shopify Node.js servers and other StatsD utilities
@shopify/statsd
An opinionated StatsD client for Shopify Node.js servers and other StatsD utilities.
yarn add @shopify/statsd
Create a StatsD client with the following:
import {StatsDClient} from '@shopify/statsd';
const statsdClient = new StatsDClient({
host: 'some-statsd-host.com',
port: '8125',
prefix: 'AppName',
suffix: 'AppSuffix',
globalTags: {hello: 'world'},
});
distribution
Tracks the statistical distribution of a set of values across your infrastructure.
statsdClient.distribution(
'navigationComplete',
100, // in milliseconds
['navigation', 'complete', 'performance'], // user-defined tags to go with the data
);
timing
Represents the timing stat
statsdClient.timing(
'request_duration',
100, // in milliseconds
[], // user-defined tags to go with the data
);
gauge
Represents the gauge stat
statsdClient.gauge(
'my_gauge',
123.45, // value
[], // user-defined tags to go with the data
);
increment
Increments a stat by 1.
statsdClient.increment(
'myCounter',
['navigation', 'complete', 'performance'], // user-defined tags to go with the data
);
Increment can also be supplied a value to increment the metric by.
statsdClient.increment(
'myCounter',
['navigation', 'complete', 'performance'], // user-defined tags to go with the data,
{}, // additional options
4, // value to increment by
);
close
Close statsd client. This will ensure all stats are sent and stop statsd from doing anything more.
statsdClient.close();
childClient
Create a child client and add more context to the client. The globalTags will be merged. The prefix and suffix will be concatenated like in this example.
statsdClient.childClient({
prefix: '.NewPrefix',
suffix: '.NewSuffix',
globalTags: {foo: 'bar'},
});
In this example the prefix will be AppName.NewPrefix
, the suffix will be AppSuffix.NewSuffix
and the globalTags will be {hello: 'world', foo: 'bar'}
.
FAQs
An opinionated StatsD client for Shopify Node.js servers and other StatsD utilities
The npm package @shopify/statsd receives a total of 0 weekly downloads. As such, @shopify/statsd popularity was classified as not popular.
We found that @shopify/statsd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 24 open source maintainers collaborating on the project.
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.