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

Support redis tracing through the plugin API #377

Merged
merged 12 commits into from
Feb 17, 2017

Conversation

DominicKramer
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 8, 2017
labels.result = res;
}
}
Object.keys(labels).forEach(function(key) {

This comment was marked as spam.

This comment was marked as spam.


function sendCommandWrap(api, send_command) {
return function send_command_trace(cmd, args, cb) {
var root = api.getTransaction();

This comment was marked as spam.

This comment was marked as spam.

file: '',
versions: '<2.3.x',
patch: function(redis, api) {
patchBelowV2_6(redis, api);

This comment was marked as spam.

This comment was marked as spam.

file: '',
versions: '2.6.x',
patch: function(redis, api) {
patchEqualV2_6(redis, api);

This comment was marked as spam.

This comment was marked as spam.

return api.wrap(fn);
}

////////////////////////////////////////////////////////////////////////////////

This comment was marked as spam.

This comment was marked as spam.

name: 'redis-' + cmd,
skipFrames: skipped_frames + 1
});
Object.keys(labels).forEach(function(key) {

This comment was marked as spam.

This comment was marked as spam.

@DominicKramer DominicKramer force-pushed the plugin/implement-redis branch 3 times, most recently from d94d518 to 9e9e5e6 Compare February 15, 2017 22:43

function internalSendCommandWrap(api, internal_send_command) {
return function internal_send_command_trace(cmd, args, cb) {
var root = api.getRootSpan();

This comment was marked as spam.

This comment was marked as spam.


function sendCommandWrap(api, send_command) {
return function send_command_trace(cmd, args, cb) {
var root = api.getRootSpan();

This comment was marked as spam.

This comment was marked as spam.

return api.wrap(fn);
}

function wrapInternalSendCommand(redis, api) {

This comment was marked as spam.

Copy link
Contributor

@kjin kjin left a comment

Choose a reason for hiding this comment

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

Looks good from a correctness point of view -- but I think there are a few points that could use additional clarity.


function internalSendCommandWrap(api, internal_send_command) {
return function internal_send_command_trace(cmd, args, cb) {
if (arguments.length === 1 && typeof cmd === 'object') {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

}

function startSpanFromArguments(api, cmd, args, cb, send_command) {
if (!cmd || !args || typeof cmd !== 'string' || !Array.isArray(args) ||

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@kjin kjin left a comment

Choose a reason for hiding this comment

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

LGTM as long as comments are made. No need to change the code structurally.

@DominicKramer DominicKramer merged commit bb926ac into googleapis:master Feb 17, 2017
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