Skip to content

Conversation

@ray-roestenburg-da
Copy link
Contributor

@ray-roestenburg-da ray-roestenburg-da commented Dec 15, 2025

Pull Request Checklist

  • add a test for metrics
  • add a dashboard

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

@ray-roestenburg-da ray-roestenburg-da force-pushed the ray/http-client-metrics branch 3 times, most recently from 632ad21 to 7749f68 Compare December 16, 2025 15:56
@ray-roestenburg-da ray-roestenburg-da marked this pull request as ready for review December 16, 2025 15:56
@ray-roestenburg-da
Copy link
Contributor Author

/cluster_test

@github-actions
Copy link

Deploy cluster test triggered for Commit 7749f68cc59f67c87bc93c7a92c3f26ef106500b in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/44537

@ray-roestenburg-da ray-roestenburg-da force-pushed the ray/http-client-metrics branch 3 times, most recently from 8361b87 to 6ae7d99 Compare December 16, 2025 16:13
@ray-roestenburg-da
Copy link
Contributor Author

/cluster_test

@github-actions
Copy link

Deploy cluster test triggered for Commit 6ae7d99e5eab1e198a8ae44ef9a41e99f5a7e181 in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/44546

@ray-roestenburg-da
Copy link
Contributor Author

/cluster_test

@github-actions
Copy link

Deploy cluster test triggered for Commit 16dc014b327751024553429a7883c89ff4cb66ec in , please contact a Contributor to approve it in CircleCI: https://app.circleci.com/pipelines/github/DACH-NY/canton-network-internal/44578

Signed-off-by: Raymond Roestenburg <[email protected]>
@ray-roestenburg-da
Copy link
Contributor Author

Hey @nicu-da maybe you can have a first look, still need to add a dashboard and metrics tests though.

Copy link
Contributor

@nicu-da nicu-da left a comment

Choose a reason for hiding this comment

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

Thank you! Really nice cleanup.
I think we just need to tune the labels a bit more to get a proper dashboard built

)
}

def getParticipantClient()(implicit ec: ExecutionContext): ParticipantClientReference = {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can make these private right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's in abstract class so we can make it protected


object HttpClientMetrics {
def context(request: HttpRequest, path: String) =
MetricsContext("method" -> request.method.name, "path" -> path)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am afraid that will blow up the cardinality. Issue is that we can have paths that also include ids in them and that can grow unbounded.
I would instead add an operationName param to the execute method, and propagate from the call sites to ensure we can track which method it is.

Copy link
Contributor

Choose a reason for hiding this comment

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

We probably also want to include a clientName or something to distinguish between scan client, sv app client

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I wanted to avoid doing that since it's a bit more work, but I agree that it makes sense, and is worth the effort. (good point on blowing up the cardinality)

}

object HttpClientMetrics {
def context(request: HttpRequest, path: String) =
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be feasible to also add the host?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, will do (authority part of request)

…p/HttpClient.scala

Co-authored-by: Nicu Reut <[email protected]>
Signed-off-by: Raymond Roestenburg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants