Provide trace context tracking in google-cloud-core #1098
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We move TraceContext tracking into google-cloud-core. (Currently this functionality is partially implemented in google-cloud-logging.) I want to centralize it because the Trace instrumentation work requires that multiple services (currently trace and logging, but likely to include the other Stackdriver services in the future) be able to cooperate in managing this context data.
This introduces an object for TraceContext. It also introduces a common algorithm for obtaining and memoizing TraceContext in the Rack environment so that different services will see a consistent state for the same request.
I bumped the google-cloud-core version to 0.22 because when I modify google-cloud-logging and google-cloud-trace to use this mechanism, they will be dependent on this change and thus require a new minor release of those gems. I intend to release google-cloud-core 0.22.0 first, and then later when I've made downstream dependent changes to other gems I'll bump their versions.