-
Notifications
You must be signed in to change notification settings - Fork 311
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
Add metrics for subscriptions and WebSocket sessions #944
Comments
@nlemoing We migrated from the
|
@sgrannan Thanks for the tip! I tried to use |
Thanks for this report and the discussion so far. I agree, this feature is currently missing in Spring for GraphQL and we should have a look at it. So far, we have instrumented the GraphQL engine with a graphql-java For such metrics, we can't depend on the Observation API because it only covers timers. For gauges and counters, we'll need the Metrics API and we must make that an optional dependency. We should look into providing a In the case of active WebSocket sessions, we could expose the information on the WebSocket handler directly and make the binder quite straightforward. As for the subscriptions count, it's a different story since subscriptions can happen over multiple transports (SSE, WebSocket, RSocket) - ideally, a single metric should count them all and they should be tagged by transport. I'll schedule this for the 1.3.x generation and I'll report back here after investigating a bit. |
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.2org.springframework.boot:spring-boot-starter-graphql
, version 3.2.2org.springframework.boot:spring-boot-starter-actuator
, version 3.2.2org.springframework.boot:spring-boot-starter-websocket
, version 3.2.2io.micrometer:micrometer-registry-statsd
, version 1.12.1I 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:
graphql-spring-boot
, and found references to Websocket metrics likegraphql.websocket.sessions
. Do those metrics still exist in the current version of the library?The text was updated successfully, but these errors were encountered: