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

Add pid to root spans #92

Merged
merged 3 commits into from
Jul 6, 2017
Merged

Add pid to root spans #92

merged 3 commits into from
Jul 6, 2017

Conversation

bmermet
Copy link
Contributor

@bmermet bmermet commented Jul 5, 2017

This PR automatically adds the process id of the current process as a metadata when creating a new root span.

@bmermet bmermet requested review from ufoot and LotharSee July 5, 2017 14:16
@bmermet bmermet added the core label Jul 5, 2017

// Standard error message metadata fields.
const (
Pid = "system.pid"
Copy link
Member

Choose a reason for hiding this comment

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

I suspect a good Go linter would require a comment here.

span.Finish()
span.SetMeta("finished.test", "true")
assert.Equal(len(span.Meta), 1)
assert.Equal(len(span.Meta), nMeta)
Copy link
Member

Choose a reason for hiding this comment

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

Always feeling sad when I see this, I think testify expects the "expected value" to be on the left side (first arg) and the actual value on the right side. But then, the rest of this file (and of the project) has been done the wrong way. I'm mixed. But feel free to rewrite them the other way, it's just a nitpick anyway, makes error messages clearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mea culpa, I had noticed but I was lazy ;) It's fixed now.
For the record :%s/(assert[^(])((.), (.*))/\1(\3, \2)/gc in vim does the work pretty well.

@bmermet bmermet merged commit 3b15a68 into master Jul 6, 2017
@bmermet bmermet deleted the bmermet/add-pid branch July 6, 2017 14:11
jdgordon pushed a commit to jdgordon/dd-trace-go that referenced this pull request May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants