![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.
Small App Metrics Toolkit for NodeJS/Typescript
Some custom metrics reporters and a partial port of the java instrumentor project.
Built using the metrics
module in npm.
Instrumenting Methods
Instrument an async method by giving it a name and wrapping it with instrument
:
const monkit = require('monkit');
const result = await monkit.instrument("my.important.method", async () => {
return await doImportantWork();
});
// By default, metrics will be stored in the project registry available via `monkit.getRegistry()`
console.log(monkit.getRegistry().timer("my.important.method.timer").count()); // 1
Using Decorators
Methods decorated with @instrumented
will be instrumented as ClassName.MethodName
with timing, throughput, and error tracking:
const instrumented = require('monkit').instrumented;
class MyClass {
@instrumented
public async myMethod(): ImportantThing {
return await doImportantWork();
}
}
const result = await new MyClass().myMethod();
// By default, metrics will be stored in the project registry available via `monkit.getRegistry()`
console.log(monkit.getRegistry().timer("MyClass.myMethod.timer").count()); // 1
Reporting Metrics
Extra Reporters include
StatsdReporter
for reporting preagregated metrics as statsd gaugesStatusPageReporter
, which can be used to periodically send metrics to statuspage.ioAt time of writing, still need to tweak monkit.Registry
to make it compatible with other reporters from the metrics
pacakge.
FAQs
Application Metrics Toolkit for NodeJS/Typescript
We found that monkit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.