Skip to content
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

Fix request ID handling in HttpTraceInitializer #89

Merged
merged 1 commit into from
Feb 10, 2016
Merged

Conversation

klingerf
Copy link
Member

Some general cleanup related to how request IDs are handled, as follows:

@klingerf klingerf self-assigned this Feb 10, 2016
@siggy
Copy link
Member

siggy commented Feb 10, 2016

lgtm! 👍 ⭐

@esbie
Copy link
Contributor

esbie commented Feb 10, 2016

sweet 👍 🔋

val id = id0.sampled match {
case Some(s) => id0
case None => id0.copy(_sampled = tracer.sampleTrace(id0))
def sample[T](sampler: Option[Sampler])(f: => T) = {
Copy link
Member

Choose a reason for hiding this comment

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

nit: omit needless braces (the def doesn't need its own braces since everything is in the sampler match

@rmars
Copy link
Contributor

rmars commented Feb 10, 2016

👍

Trace.letTracerAndNextId(tracer) {
sample(sampler) {
service(req)
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

tioli: this block may warrant a small comment about the ordering of things. e.g.

// 1. Set the trace id from the header, if one was provided
// 2. Get a new trace Id for this request.
// 3. Use the sample header to determine if tracing should be forced.

@olix0r
Copy link
Member

olix0r commented Feb 10, 2016

very nice! thanks for taking time to dig into this. ⭐

@klingerf
Copy link
Member Author

Addressed @olix0r's feedback and rebased. ⭐

@olix0r
Copy link
Member

olix0r commented Feb 10, 2016

Fixing a few issues related to request IDs:

* New traces are now assigned a unique root request ID
* New incoming server requests for existing traces are assigned a unique span ID
* Added more extensive tests for request ID handling
@klingerf
Copy link
Member Author

⭐ rebased (again)

klingerf added a commit that referenced this pull request Feb 10, 2016
Fix request ID handling in HttpTraceInitializer
@klingerf klingerf merged commit 743ef1b into master Feb 10, 2016
@klingerf klingerf deleted the kl/events branch February 11, 2016 00:20
Tim-Brooks pushed a commit to Tim-Brooks/linkerd that referenced this pull request Dec 20, 2018
* Make TabbedMetricsTable in charge of fetching timeseries

All of the parent components in charge of fetching timeseries data
don't actually use them, but pass them to this table. It would simplify
a lot of the parents if this component handled the ts fetching too.

This introduces a urlsForResource helper in ApiHelpers to allow
us to consolidate url generating in the app to one place. It also
associates the appropriate groupBy for various fetches.

Signed-off-by: Risha Mars <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants