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

feat: add public API for root span id #542

Merged
merged 1 commit into from
Aug 29, 2017

Conversation

ofrobots
Copy link
Contributor

@ofrobots ofrobots commented Aug 22, 2017

Make it possible for external users to get a unique identifier for the
root span. This can be used to uniquely identify the top level
incoming http request context for example.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 22, 2017
@ofrobots ofrobots requested review from matthewloring and kjin August 22, 2017 00:17
@matthewloring
Copy link
Contributor

Typo in the commit message identified -> identifier.

src/trace-api.js Outdated
@@ -33,6 +33,7 @@ var TracingPolicy = require('./tracing-policy.js');
var phantomApiImpl = {
enhancedDatabaseReportingEnabled: function() { return false; },
runInRootSpan: function(opts, fn) { return fn(null); },
// getRootSpanId: function() { return null; },

This comment was marked as spam.

Copy link
Contributor

@matthewloring matthewloring left a comment

Choose a reason for hiding this comment

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

LGTM with a nit.

src/trace-api.js Outdated
* is that the value would unique for every root span.
* @returns {string} the root span id, or null if it doesn't exist
*/
TraceAgent.prototype.getRootSpanId = function() {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Make it possible for external users to get a unique identifier for the
root span. This can be used to uniquely identify the top level
incoming http request context for example.
@ofrobots ofrobots force-pushed the expose-root-span-id branch from b3eea77 to 8949b80 Compare August 29, 2017 20:23
@@ -33,6 +33,7 @@ var TracingPolicy = require('./tracing-policy.js');
var phantomApiImpl = {
enhancedDatabaseReportingEnabled: function() { return false; },
runInRootSpan: function(opts, fn) { return fn(null); },
getCurrentContext: function() { return null; },

This comment was marked as spam.

@ofrobots
Copy link
Contributor Author

Renamed to getCurrentContextId. Will land once the CI is green.

@ofrobots ofrobots merged commit debc493 into googleapis:master Aug 29, 2017
@ofrobots ofrobots deleted the expose-root-span-id branch August 29, 2017 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants