Skip to content

Commit

Permalink
chore(release): update monorepo packages versions
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 13, 2024
1 parent b7dc96a commit f24fddc
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 81 deletions.
5 changes: 0 additions & 5 deletions .changeset/@envelop_graphql-jit-2327-dependencies.md

This file was deleted.

74 changes: 0 additions & 74 deletions .changeset/cold-seals-play.md

This file was deleted.

10 changes: 10 additions & 0 deletions packages/plugins/graphql-jit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @envelop/graphql-jit

## 8.0.4

### Patch Changes

- [#2327](https://github.com/n1ru4l/envelop/pull/2327)
[`b7dc96a`](https://github.com/n1ru4l/envelop/commit/b7dc96abd58f71984e372439ab62e0bd11215273)
Thanks [@renovate](https://github.com/apps/renovate)! - dependencies updates:
- Updated dependency [`graphql-jit@0.8.7` ↗︎](https://www.npmjs.com/package/graphql-jit/v/0.8.7)
(from `0.8.6`, in `dependencies`)

## 8.0.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/graphql-jit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@envelop/graphql-jit",
"version": "8.0.3",
"version": "8.0.4",
"type": "module",
"repository": {
"type": "git",
Expand Down
78 changes: 78 additions & 0 deletions packages/plugins/prometheus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,83 @@
# @envelop/prometheus

## 12.0.0

### Major Changes

- [#2317](https://github.com/n1ru4l/envelop/pull/2317)
[`0977ef7`](https://github.com/n1ru4l/envelop/commit/0977ef74dc997108229c8906a650bfbd922a45f1)
Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Allow to explicitly control which
events and timing should be observe.

Each metric can now be configured to observe events and timings only for certain GraphQL pipeline
phases, or depending on the request context.

```ts
import { execute, parse, specifiedRules, subscribe, validate } from 'graphql'
import { envelop, useEngine } from '@envelop/core'
import { usePrometheus } from '@envelop/prometheus'

const TRACKED_OPERATION_NAMES = [
// make a list of operation that you want to monitor
]

const getEnveloped = envelop({
plugins: [
useEngine({ parse, validate, specifiedRules, execute, subscribe }),
usePrometheus({
metrics: {

// only trace errors of execute and subscribe phases
graphql_envelop_phase_error: ['execute', 'subscribe']

// only monitor timing of some operations
graphql_yoga_http_duration: createHistogram({
registry,
histogram: {
name: 'graphql_envelop_request_duration',
help: 'Time spent on HTTP connection',
labelNames: ['operation_name']
},
fillLabelsFn: ({ operationName }, _rawContext) => ({
operation_name: operationName,
}),
phases: ['execute', 'subscribe'],

// Here `shouldObserve` control if the request timing should be observed, based on context
shouldObserve: (_, context) => TRACKED_OPERATIONS.includes(context?.params?.operationName),
})
},
})
]
})
```

**Breaking Change**: A metric is enabled using `true` value in metrics options will observe in
every phases available.

Previously, which phase was observe was depending on which other metric were enabled. For example,
this config would only trace validation error:

```ts
usePrometheus({
metrics: {
graphql_envelop_phase_error: true,
graphql_envelop_phase_validate: true
}
})
```

This is no longer the case. If you were relying on this behavior, please use an array of string to
restrict observed phases.

```ts
usePrometheus({
metrics: {
graphql_envelop_phase_error: ['validate']
}
})
```

## 11.0.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/prometheus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@envelop/prometheus",
"version": "11.0.0",
"version": "12.0.0",
"type": "module",
"repository": {
"type": "git",
Expand Down

0 comments on commit f24fddc

Please sign in to comment.