New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@envelop/prometheus

Package Overview
Dependencies
Maintainers
1
Versions
1375
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/prometheus - npm Package Compare versions

Comparing version 10.0.0-alpha-20240429150713-f648c855 to 10.0.0-alpha-20240503114356-10955cdf

2

package.json
{
"name": "@envelop/prometheus",
"version": "10.0.0-alpha-20240429150713-f648c855",
"version": "10.0.0-alpha-20240503114356-10955cdf",
"sideEffects": false,

@@ -5,0 +5,0 @@ "peerDependencies": {

@@ -98,3 +98,3 @@ ## `@envelop/prometheus`

import { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { Histogram } from 'prom-client'
import { Histogram, register as registry } from 'prom-client'
import { envelop, useEngine } from '@envelop/core'

@@ -127,1 +127,22 @@ import { createHistogram, usePrometheus } from '@envelop/prometheus'

```
## Caveats
Due to Prometheus client API limitations, if this plugin is initialized multiple times, only the
metrics configuration of the first initialization will be applied.
If necessary, use a different registry instance for each plugin instance, or clear the registry
before plugin initialization.
```ts
function usePrometheusWithRegistry() {
const registry = new Registry()
return usePrometheus({
registry,
...
})
}
```
Keep in mind that this implies potential data loss in pull mode if some data is produced between
last pull and the re-initialization of the plugin.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc