-
Notifications
You must be signed in to change notification settings - Fork 98
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
Plugin API: Add createChildSpan #373
Conversation
src/trace-plugin-interface.js
Outdated
* span is created and propogated. @see Transaction.prototype.createChildSpan | ||
* @returns A new ChildSpan object, or null if there is no active root span. | ||
*/ | ||
PluginAPI.prototype.createChildSpan = function(options, fn) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/trace-plugin-interface.js
Outdated
var transaction = this.getTransaction(); | ||
if (transaction) { | ||
options = options || {}; | ||
var childContext = transaction.agent_.startSpan(options.name, {}, | ||
options.skipFrames ? options.skipFrames + 1 : 1); | ||
return fn(new ChildSpan(transaction.agent_, childContext)); | ||
return new ChildSpan(transaction.agent_, childContext); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/trace-plugin-interface.js
Outdated
*/ | ||
PluginAPI.prototype.runInChildSpan = function(options, fn) { | ||
PluginAPI.prototype.createChildSpan = function(options, fn) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/trace-plugin-interface.js
Outdated
*/ | ||
Transaction.prototype.runInChildSpan = function(options, fn) { | ||
Transaction.prototype.createChildSpan = function(options, fn) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Introduces
Transaction.prototype.createChildSpan
(andapi.prototype.createChildSpan
). Would like to rip outrunInChildSpan
if possible, it no longer has a reason to be used.