Skip to content

Add metrics for subscriptions and WebSocket sessions #944

Open
@nlemoing

Description

@nlemoing

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?

Metadata

Metadata

Assignees

Labels

in: webIssues related to web handlingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions