Skip to content

feat(subscription): add operation_name label to apollo.router.opened.subscriptions counter #7606

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

Merged
merged 13 commits into from
Jun 10, 2025

Conversation

bnjjj
Copy link
Contributor

@bnjjj bnjjj commented Jun 4, 2025

This PR adds a new label on apollo.router.opened.subscriptions metric to know exactly which subscription is still opened.


Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Metrics and logs are added3 and documented
  • Tests added and passing4
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. A lot of (if not most) features benefit from built-in observability and debug-level logs. Please read this guidance on metrics best-practices.

  4. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@bnjjj bnjjj requested a review from a team as a code owner June 4, 2025 08:52

This comment has been minimized.

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Jun 4, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 18 changed, 0 removed
* graphos/routing/(latest)/cloud/subscriptions.mdx
* graphos/routing/(latest)/configuration/yaml.mdx
* graphos/routing/(latest)/observability/telemetry/trace-exporters/overview.mdx
* graphos/routing/(latest)/operations/subscriptions/overview.mdx
* graphos/routing/(latest)/operations/subscriptions/configuration.mdx
* graphos/routing/(latest)/operations/defer.mdx
* graphos/routing/(latest)/operations/file-upload.mdx
* graphos/routing/(latest)/performance/caching/entity.mdx
* graphos/routing/(latest)/performance/caching/in-memory.mdx
* graphos/routing/(latest)/query-planning/native-query-planner.mdx
* graphos/routing/(latest)/security/csrf.mdx
* graphos/routing/(latest)/security/demand-control.mdx
* graphos/routing/(latest)/security/authorization.mdx
* graphos/routing/(latest)/security/subgraph-authentication.mdx
* graphos/routing/(latest)/security/persisted-queries.mdx
* graphos/routing/(latest)/graphos-reporting.mdx
* graphos/routing/(latest)/uplink.mdx
* graphos/routing/(latest)/license.mdx

Build ID: 7b98c8b2b5e28b90dae5f374

URL: https://www.apollographql.com/docs/deploy-preview/7b98c8b2b5e28b90dae5f374

@bnjjj bnjjj requested a review from BrynCooke June 6, 2025 13:04
@bnjjj bnjjj added the backport-1.x Backport this PR to 1.x label Jun 6, 2025
Signed-off-by: Benjamin <[email protected]>
@bnjjj bnjjj requested a review from a team as a code owner June 6, 2025 13:08
Copy link
Contributor

@BrynCooke BrynCooke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs docs for the subscription metric updated.

bnjjj added 2 commits June 10, 2025 10:42
Signed-off-by: Benjamin <[email protected]>
….com:apollographql/router into bnjjj/add_operation_name_subscription_metric
@apollo-librarian
Copy link

apollo-librarian bot commented Jun 10, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 22 changed, 0 removed
* (developer-tools)/apollo-mcp-server/(latest)/command-reference.mdx
* (developer-tools)/rover/commands/dev.mdx
* graphos/routing/(latest)/cloud/subscriptions.mdx
* graphos/routing/(latest)/configuration/yaml.mdx
* graphos/routing/(latest)/observability/telemetry/instrumentation/standard-instruments.mdx
* graphos/routing/(latest)/observability/telemetry/trace-exporters/overview.mdx
* graphos/routing/(latest)/operations/subscriptions/overview.mdx
* graphos/routing/(latest)/operations/subscriptions/configuration.mdx
* graphos/routing/(latest)/operations/defer.mdx
* graphos/routing/(latest)/operations/file-upload.mdx
* graphos/routing/(latest)/performance/caching/entity.mdx
* graphos/routing/(latest)/performance/caching/in-memory.mdx
* graphos/routing/(latest)/query-planning/native-query-planner.mdx
* graphos/routing/(latest)/security/csrf.mdx
* graphos/routing/(latest)/security/demand-control.mdx
* graphos/routing/(latest)/security/authorization.mdx
* graphos/routing/(latest)/security/subgraph-authentication.mdx
* graphos/routing/(latest)/security/persisted-queries.mdx
* graphos/routing/(latest)/graphos-reporting.mdx
* graphos/routing/(latest)/uplink.mdx
* graphos/routing/(latest)/license.mdx
* graphos/schema-design/federated-schemas/reference/moving-to-federation-2.mdx

Build ID: 161290569748dcc2b656cc43

URL: https://www.apollographql.com/docs/deploy-preview/161290569748dcc2b656cc43

@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 161290569748dcc2b656cc43

3 similar comments
@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 161290569748dcc2b656cc43

@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 161290569748dcc2b656cc43

@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 161290569748dcc2b656cc43

@bnjjj bnjjj enabled auto-merge (squash) June 10, 2025 08:45
@bnjjj bnjjj merged commit e7b7e40 into dev Jun 10, 2025
14 checks passed
@bnjjj bnjjj deleted the bnjjj/add_operation_name_subscription_metric branch June 10, 2025 12:39
bnjjj added a commit that referenced this pull request Jun 10, 2025
…subscriptions counter (#7606)

Signed-off-by: Benjamin <[email protected]>
Co-authored-by: carodewig <[email protected]>
Co-authored-by: bryn <[email protected]>
(cherry picked from commit e7b7e40)

# Conflicts:
#	apollo-router/src/metrics/mod.rs
#	docs/source/routing/observability/telemetry/instrumentation/standard-instruments.mdx
bnjjj added a commit that referenced this pull request Jun 10, 2025
…subscriptions counter (backport #7606) (#7656)

Signed-off-by: Benjamin <[email protected]>
@abernix abernix mentioned this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-1.x Backport this PR to 1.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants