Skip to content

Unable to call the "Health" endpoint using the Kotlin SDK #2077

@salockhart

Description

@salockhart

Bug Report

Version

com.svix.kotlin:svix-kotlin:1.76.1

Platform

Darwin {name omitted} 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64

Description

I am using the Kotlin SDK to wire up a Spring Boot service with the Svix API.

As part of that, I would like to add a custom health indicator to my service that reports on its ability to connect to Svix. If it cannot connect, I want it to report as "DOWN".

However, the following code does not work:

svix.health.get()

That appears to be because the health endpoints are not registered in the main Svix client.

I considered instantiating the Health class myself, but it requires a SvixHttpClient that I would also have to instantiate myself, and that one is more complex. Unfortunately, there doesn't seem to be a way to pull the client out of the Svix class.

My understanding would be that the following change to Svix would be able to resolve this issue:

          application = Application(httpClient)
          authentication = Authentication(httpClient)
          endpoint = Endpoint(httpClient)
          eventType = EventType(httpClient)
          ingest = Ingest(httpClient)
          integration = Integration(httpClient)
          message = Message(httpClient)
          messageAttempt = MessageAttempt(httpClient)
          statistics = Statistics(httpClient)
+         health = Health(httpClient)
          operationalWebhook = OperationalWebhook(httpClient)
          operationalWebhookEndpoint = OperationalWebhookEndpoint(httpClient)
      }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions