Skip to content

Conversation

GabrielBuica
Copy link
Contributor

@GabrielBuica GabrielBuica commented Feb 5, 2025

It continues the path of threading the trace_context across different components. Specifically, from xapi to smapi and back to xapi.

Additional improvement: the tracecontext is passed even when smapi component is experimental and it does not create spans. Therefore, it is not creating orphaned spans from http requests made to xapi.

BVT+BST: 213297

@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-53161 branch from 3cc819e to 4558f24 Compare February 5, 2025 14:52
These changes append the `baggage` of the `trace_context` to the list of
environment variables that are about to be submitted to SM scripts by
`forkexec`.

This should improve the propagation of `trace_context` along traces that
use multiple components.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
This links requests back into `xapi` from `smapi` to the xapi request
that called the SM scripts in the first place.

When `smapi` was experimental there would be no traceparent header
passed in the request from `smapi` to `xapi`. Now, when `smapi` is
experimental and the tracing is enabled for xapi, the traceparent passed
to `smapi` is passed back to `xapi` for each request.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-53161 branch from 4558f24 to f4465eb Compare February 26, 2025 12:56
@GabrielBuica GabrielBuica marked this pull request as ready for review February 27, 2025 13:47
Copy link
Contributor

@edwintorok edwintorok left a comment

Choose a reason for hiding this comment

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

Can you squash the fixup into the commit, that should fix the failing DCO test.

When a the baggage is passed as an environment variable, it is now added
to the resource attributes inside of `observer.py`.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
Just as the traceparent is passed back as an additional header, now the
baggage is passed as well in the http request coming from `smapi` back into
`xapi`.

Signed-off-by: Gabriel Buica <danutgabriel.buica@cloud.com>
@GabrielBuica GabrielBuica force-pushed the private/dbuica/CP-53161 branch from 29faa32 to 87a4a5a Compare March 3, 2025 17:22
@edwintorok edwintorok added this pull request to the merge queue Mar 14, 2025
Merged via the queue into xapi-project:master with commit 82064d3 Mar 14, 2025
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.

7 participants