-
Notifications
You must be signed in to change notification settings - Fork 373
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
[docs] be more explicit in docs #146
Conversation
lib/ddtrace/span.rb
Outdated
@@ -65,8 +65,8 @@ def get_tag(key) | |||
@meta[key] | |||
end | |||
|
|||
# Set the given key / value metric pair on the span. Keys must be string. | |||
# Values must be floating point numbers. | |||
# This method sets a tag for a floating point value for the given key. It acts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for a floating point
-> with a floating point
? Wondering. It's just about language/wording, indeed it's good not to advocate too much for that set_metric
usage when there's almost no difference with set_tag
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we don't advocate set_metric()
at all, indeed it's not in the docs and there is not a particular reason to use it instead of set_tag()
. Here I just want to write something that is explicit that set_metric()
acts like set_tag()
and does not have anything to do with infrastructure metrics.
Do you think we can reword it better?
@@ -350,7 +350,7 @@ to trace requests to the home page: | |||
|
|||
# add some attributes and metrics | |||
span.set_tag('http.method', request.request_method) | |||
span.set_metric('posts.count', len(@posts)) | |||
span.set_tag('posts.count', @posts.length) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch on len(
-> .length
8ed93b8
to
7dbf98a
Compare
Overview
Updates docs and docstrings to be more clear.