Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added telemetry for Rhai usage #6027

5 changes: 5 additions & 0 deletions .changesets/maint_feature_rhaitelemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Added telemetry for Rhai usage ([PR #6027](https://github.com/apollographql/router/pull/6027))

Added telemetry for Rhai usage

By [@andrewmcgivery](https://github.com/andrewmcgivery) in https://github.com/apollographql/router/pull/6027
8 changes: 8 additions & 0 deletions apollo-router/src/configuration/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ impl InstrumentData {
opt.subgraph.response,
"$.subgraph..response"
);
populate_config_instrument!(
apollo.router.config.rhai,
"$.rhai",
opt.scripts,
"$[?(@.scripts)]",
opt.main,
"$[?(@.main)]"
);
populate_config_instrument!(
apollo.router.config.persisted_queries,
"$.persisted_queries[?(@.enabled == true)]",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
source: apollo-router/src/configuration/metrics.rs
expression: "&metrics.non_zero()"
---
- name: apollo.router.config.rhai
data:
datapoints:
- value: 1
attributes:
opt.main: true
opt.scripts: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rhai:
scripts: rhai
main: main.rhai
Loading