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

CP-50426: Trace external authentication modules #5901

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

contificate
Copy link
Contributor

This rather mechanical change simply propagates a __context through each of the functions within Auth_signature.t and selectively adds tracing to some of those functions (many of the functions are failure or no-op stubs).

Below is a screenshot of a trace within Jaeger, which shows a failed login attempt using an Active Directory server:
image

I've committed 3 things but intend to squash them.

This stylistic change is shorter than alternatives. The actual intention is to
ensure that Merlin doesn't get confused when jumping to definition. The
previous behaviour is that Merlin jumps to the type definition rather than
realising it ought to jump to the implementation being referred to inside the
record.

This commit should be squashed together with what follows.

Signed-off-by: Colin James <colin.barr@cloud.com>
Rewrites all functions in Auth_signature.t - the record type used by external
authentication plugins - to take a xapi __context:Context.t as a first
parameter. Changes are rather mechanical but, by threading this through, we can
now add tracing to interesting parts (along with making the tracing more
granular in future).

Signed-off-by: Colin James <colin.barr@cloud.com>
Endows the propagated __context parameters with tracing (in some cases). It is
not applied to all possible places as many of the functions are actually
failure/no-op stubs.

Signed-off-by: Colin James <colin.barr@cloud.com>
Copy link
Member

@psafont psafont left a comment

Choose a reason for hiding this comment

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

I don't see the point of squashing the commits, they look good as they are

@contificate contificate merged commit 6159aa3 into xapi-project:master Aug 1, 2024
15 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.

4 participants