Skip to content
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

Fix how monitoring proxy messages is handled #1276

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

kian99
Copy link
Contributor

@kian99 kian99 commented Jul 19, 2024

Description

Currently JIMM's dashboards shows reasonable request durations for controller level calls. Model calls however show incorrect values and are missing labels.

Digging into this, the issue is how we were monitoring proxied messages in the model proxy. When a controller response is sent back to a client, we remove the client message from a map. In this function we were monitoring the duration of the request and applying labels to include the facade and method name. The error is that we were using the response from the Juju controller to record the labels but responses from Juju don't hold this information (responses are related to requests by a message ID) so instead, use the request's facade and method name which will be populated.

The same error applied to the message duration, the response does not have its start field set, only the request does so the duration of the request was default value of time.Time (0001-01-01 00:00:00 +0000 UTC) until now.

I've modified the removeMessage function to accept a message ID rather than a whole message to make things clearer.

Engineering checklist

Check only items that apply

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

@kian99 kian99 requested a review from a team as a code owner July 19, 2024 12:22
Copy link
Collaborator

@alesstimec alesstimec left a comment

Choose a reason for hiding this comment

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

LGTM

@kian99 kian99 merged commit ea59fdc into canonical:v3 Jul 22, 2024
3 checks passed
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