Skip to content

Commit

Permalink
Fixes on Prometheus plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Mar 13, 2024
1 parent bb8573f commit 57f4a60
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .changeset/big-humans-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-mesh/types": patch
"@graphql-mesh/plugin-prometheus": patch
---

Fixes on Prometheus plugin
13 changes: 10 additions & 3 deletions packages/legacy/types/src/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,7 @@
}
]
},
"fetch": {
"fetchMetrics": {
"description": "Any of: Boolean, String",
"anyOf": [
{
Expand Down Expand Up @@ -2678,8 +2678,15 @@
"type": "boolean"
},
"endpoint": {
"type": "string",
"description": "The path to the metrics endpoint\ndefault: `/metrics`"
"description": "The path to the metrics endpoint\ndefault: `/metrics` (Any of: Boolean, String)",
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
]
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions packages/legacy/types/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2154,9 +2154,9 @@ export interface PrometheusConfig {
httpResponseHeaders?: boolean;
/**
* The path to the metrics endpoint
* default: `/metrics`
* default: `/metrics` (Any of: Boolean, String)
*/
endpoint?: string;
endpoint?: boolean | string;
}
/**
* RateLimit plugin
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/prometheus/yaml-config.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type PrometheusConfig @md {
The path to the metrics endpoint
default: `/metrics`
"""
endpoint: String
endpoint: BooleanOrString
}

union BooleanOrString = Boolean | String
8 changes: 5 additions & 3 deletions website/src/generated-markdown/PrometheusConfig.generated.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* `subgraphExecute` - One of:
* `Boolean`
* `String`
* `fetch` - One of:
* `fetchMetrics` - One of:
* `Boolean`
* `String`
* `fetchRequestHeaders` (type: `Boolean`)
Expand All @@ -46,5 +46,7 @@
* `String`
* `httpRequestHeaders` (type: `Boolean`)
* `httpResponseHeaders` (type: `Boolean`)
* `endpoint` (type: `String`) - The path to the metrics endpoint
default: `/metrics`
* `endpoint` - - The path to the metrics endpoint
default: `/metrics` One of:
* `Boolean`
* `String`

0 comments on commit 57f4a60

Please sign in to comment.