Skip to content

Conversation

OStevan
Copy link
Contributor

@OStevan OStevan commented Oct 21, 2021

Before this PR

When looking at the trace users needed to take a look at the whole trace to find out which service/FE-app started the request chain. With this PR the tracing library will propagate this information if set through the ForUserAgent header.

After this PR

==COMMIT_MSG==
User agent specified inside ForUserAgent http header will be propagated to requests made in the same trace.
==COMMIT_MSG==

Possible downsides?

Possibly slight perf degradation as there is one more value to send/receive for every http request.

Concerns

  1. Should we have a mechanism to populate ForUserAgent based on standard user agent or should it only be propagated only if explicitly set? Something like this
  2. Should there be a mechanism in tracing to set these headers or should client libraries like dialogue provide capability to set this header?

@policy-bot policy-bot bot requested a review from tetigi October 21, 2021 12:10
@OStevan OStevan requested review from carterkozak and removed request for tetigi October 21, 2021 12:10
@OStevan OStevan added help wanted Extra attention is needed enhancement New feature or request labels Oct 21, 2021
Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

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

This should also set for-user-agent in the undertow tracing handlers which are more common in our apps than jersey these days.

Co-authored-by: Carter Kozak <[email protected]>
Comment on lines 19 to 24
/**
* Internal header names meant for consumption only inside of the tracing codebase.
*/
public interface InternalTraceHttpHeaders {
String FETCH_USER_AGENT = "Fetch-User-Agent";
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't be public if we can avoid it

Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

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

lgtm!

@carterkozak
Copy link
Contributor

🍿🤖

@carterkozak
Copy link
Contributor

Ah, we'll need another +1 here since the autorelease RC has my name on it...

@jkozlowski
Copy link

👍

@bulldozer-bot bulldozer-bot bot merged commit 37b6382 into develop Nov 3, 2021
@bulldozer-bot bulldozer-bot bot deleted the sognjanovic/for-user-agent branch November 3, 2021 09:48
@svc-autorelease
Copy link
Collaborator

Released 6.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants