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

Display contents of label values of object type #346

Merged
merged 1 commit into from
Jan 14, 2017
Merged

Display contents of label values of object type #346

merged 1 commit into from
Jan 14, 2017

Conversation

matthewloring
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 13, 2017
@matthewloring
Copy link
Contributor Author

PTAL.

@@ -37,7 +39,7 @@ function TraceSpan(name, spanId, parentSpanId) {
* @param {string} value The new value of the label.
*/
TraceSpan.prototype.setLabel = function(key, value) {
this.labels[key] = '' + value;
this.labels[key] = typeof value === 'object' ? util.inspect(value) : '' + value;

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

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

LGTM.

In the future it would be good to expose a inspect depth property that could be passed to util.inspect to allow people to customize how deep an inspection should happen.

@matthewloring matthewloring merged commit d31798c into googleapis:master Jan 14, 2017
@matthewloring matthewloring deleted the label-object branch January 14, 2017 00:09
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.

3 participants