Skip to content

Commit

Permalink
Merge pull request #146 from palazzem/update-docs
Browse files Browse the repository at this point in the history
[docs] be more explicit in docs
  • Loading branch information
Emanuele Palazzetti authored Jul 5, 2017
2 parents 8a116fc + 7dbf98a commit 85ec012
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

# trace the template rendering
tracer.trace('template.render') do
Expand Down
4 changes: 2 additions & 2 deletions lib/ddtrace/span.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 with a floating point value for the given key. It acts
# like `set_tag()` and it simply add a tag without further processing.
def set_metric(key, value)
# enforce that the value is a floating point number
value = Float(value)
Expand Down

0 comments on commit 85ec012

Please sign in to comment.