Skip to content

Further improvements to pass traceparent XenAPI.py #5672

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

Closed

Conversation

GabrielBuica
Copy link
Contributor

Follow-up to: #5639.

This attempts to instrument non-local XenAPI.py sessions.

@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-49633 branch from 06f15aa to f13d17a Compare June 5, 2024 09:58
@GabrielBuica GabrielBuica changed the title Further improvements to pass traceparent Further improvements to pass traceparent XenAPI.py Jun 5, 2024
@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-49633 branch from f13d17a to f1e61bc Compare June 13, 2024 13:45
@GabrielBuica
Copy link
Contributor Author

GabrielBuica commented Jun 17, 2024

Passes BVT+BST 199742 & 199740, all components enabled and no tracing respectively

@GabrielBuica GabrielBuica marked this pull request as ready for review June 17, 2024 08:57
@mg12
Copy link
Member

mg12 commented Jun 27, 2024

after looking at the PR, this is my attempt to summarize the changes, @GabrielBuica are these correct?

  • the PR CP-48995: Instrument XenAPI.py to submit a traceparent #5639 applied only to UDSTransport (local_login)
  • this PR is more generic, and it applies to anything derived from Transport (so it includes UDSTransport, SafeTransport and of course Transport)
  • the new behaviour is only present if otel=true (ie both OTEL_SDK_DISABLED=false and required open-telemetry libs are present)

@GabrielBuica
Copy link
Contributor Author

That's correct @mg12!

@psafont
Copy link
Member

psafont commented Jun 28, 2024

Could the explanation be added also to the commit message?

@GabrielBuica
Copy link
Contributor Author

Sure, I'll update the commit message as well.

@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-49633 branch from f1e61bc to f31a780 Compare July 1, 2024 08:52
@GabrielBuica
Copy link
Contributor Author

Updated the commit message.

@GabrielBuica
Copy link
Contributor Author

I'll changed it to draft for the time being. With the changes from feature/perf merged, we are now reusing the initial connection, therefore subsequent spans of xapi requests appear in the under the wrong parent.

@GabrielBuica GabrielBuica marked this pull request as draft July 12, 2024 10:09
`transport.make_connection` is now patched to pass a `traceparent`
header when creating a non-local session.

e.g. `XenAPI.Session(uri, transport)`

This is meant as a follow up to e5bb639 that applied only to
UDSTransport (local_login). It is  more generic and it applies
to anything derived from Transport, including UDSTransport,
SafeTransport and Transport.

The new behaviour is only present if otel=true, i.e. OTEL_SDK_DISABLED
is set to `false` and required open-telemetry libs are present.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-49633 branch from f31a780 to fb469b5 Compare July 15, 2024 14:48
@psafont
Copy link
Member

psafont commented Aug 5, 2024

Can this PR be closed? Looks like it's not useful anymore

@GabrielBuica
Copy link
Contributor Author

Can this PR be closed? Looks like it's not useful anymore

The purpose of it is still the same: to be the general version of #5639.

I will close it for now and keep the code on my branch (in case someone asks for it).

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