spring-projects / spring-projects/spring-graphql

Add metrics for subscriptions and WebSocket sessions

Open
#944 3 comments 0 reactions 1 assignee View on GitHub

@bclozel is already working on this.

Since Apr 12, 2024.

in: web type: enhancement
Dominant language
Java
Stars
1.6k
Forks
336
PR merge metrics
No merged PRs in 30d

Description

Hi! I'm trying to follow the Observability instructions to get GraphQL actuator metrics published. We're using a Datadog StatsD sidecar container, so I've added the following dependencies to my classpath:

  • org.springframework.boot:spring-boot-starter-web, version 3.2.2
  • org.springframework.boot:spring-boot-starter-graphql, version 3.2.2
  • org.springframework.boot:spring-boot-starter-actuator, version 3.2.2
  • org.springframework.boot:spring-boot-starter-websocket, version 3.2.2
  • io.micrometer:micrometer-registry-statsd, version 1.12.1

I didn't do any additional configuration or create any additional beans.

To see what metrics were available, I set management.endpoints.web.exposure.include=* and went to /actuator/metrics, but didn't see any GraphQL metrics.

I have two questions:

  • Is there a configuration I'm missing, or am I looking in the wrong place for GraphQL metrics?
  • I was looking at the predecessor project, graphql-spring-boot, and found references to Websocket metrics like graphql.websocket.sessions. Do those metrics still exist in the current version of the library?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.