Skip to content
This repository has been archived by the owner on Feb 16, 2025. It is now read-only.

Bug: Resolve bug that is possibly preventing trace ID propagation on viewing donations #625

Open
pattishin opened this issue Aug 17, 2022 · 4 comments
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@pattishin
Copy link
Contributor

pattishin commented Aug 17, 2022

Full context from @ace-n: Update: I tried to get trace ID propagation working for both POST /donate and GET /viewDonations. I was able to specify the X-Cloud-Trace-Context header in the response, but this has no effect on the request's actual trace ID (as recorded by Cloud Logging).

Related PR: #620

@pattishin pattishin self-assigned this Aug 17, 2022
@pattishin pattishin changed the title Bug: Resolve bug that is possibly preventing trace ID propagation when POST /donate, GET /viewDonations are executed. See Cloud Logging to verify. Bug: Resolve bug that is possibly preventing trace ID propagation on viewing donations Aug 17, 2022
@grayside
Copy link
Contributor

I responded to this comment in the PR. I believe this problem is rooted in a misinterpretation that we're trying to set a trace ID in a response, as opposed to extract the request trace ID and make it available for frontend UI building.

@ace-n
Copy link
Contributor

ace-n commented Aug 17, 2022

There are two requests here:

  1. a POST to /donate to submit the donation
  2. a GET [redirect] to /viewDonation to view the resulting donation

Currently, #620 only shows the first request (POST /donate) and omits the second (GET /viewDonation).


We could call this intended behavior, but I'm assuming our end-users would prefer to see the entire request chain.

@ace-n ace-n reopened this Aug 17, 2022
@grayside
Copy link
Contributor

Interesting, so the issue here is that by using a redirect in donate, we are splitting the full transaction. In a more dynamic UI, we would maybe get the confirmation without leaving the page and viewDonation would be outside this journey.

@muncus
Copy link
Contributor

muncus commented Aug 24, 2022

Trace data is really not designed to be reused between requests. It is possible to do this by having the frontend generate trace IDs to send with multiple requests, but I've only heard of that approach being taken with native (non-web) apps. (i'm also not sure that all trace backends would support non-overlapping spans).

Generally, i'd discourage any manual manipulation of trace headers, and let the OTel SDK do that for us, but i suppose that ball is already in my court 😅

@pattishin pattishin removed their assignment Sep 7, 2022
@grayside grayside added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Feb 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants