Skip to content

CP-49029: Instrument xapi_session.ml with tracing #5621

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

Merged
merged 1 commit into from
May 20, 2024

Conversation

GabrielBuica
Copy link
Contributor

Instruments xapi_session.ml to create span around session logins.

Adds new attribute for spans:

  • xs.xapi.session.originator

where available.

@psafont
Copy link
Member

psafont commented May 10, 2024

What are the consecuences of missing the originator? If it's of little inconsequence it might be fine to have the optional argument, if it's important to not miss it, it probably needs to be forced. Independently I'd prefer to see an originator argument for with_tracing, and doing the covnersion there between originator and attributes:

let with_tracing ~context ~originator name f =
  let open Tracing in
  let parent = context.tracing in
  let span_attributes = Tracing.attributes_of_originator originator in
  match
    start_tracing_helper ?span_attributes:attributes (fun _ -> parent) name
  with
  ...

@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-49029 branch from 3623de0 to 1aedd6d Compare May 13, 2024 09:34
Copy link
Member

@mg12 mg12 left a comment

Choose a reason for hiding this comment

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

lgtm: @GabrielBuica needs squashing before merge

Instruments `xapi_session.ml` to create span around session logins.

Adds new attribute for spans:

- `xs.xapi.session.originator`

where available.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-49029 branch from 1aedd6d to 8b889f5 Compare May 20, 2024 08:39
@lindig lindig merged commit 7666f7e into xapi-project:master May 20, 2024
14 checks passed
@GabrielBuica GabrielBuica deleted the private/dbuica/CP-49029 branch January 8, 2025 10:50
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