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

start_time type doesn't match code #1264

Closed
mheffner opened this issue Nov 25, 2020 · 0 comments · Fixed by #1268
Closed

start_time type doesn't match code #1264

mheffner opened this issue Nov 25, 2020 · 0 comments · Fixed by #1268
Milestone

Comments

@mheffner
Copy link

The start_time is documented as having requiring a type of Integer here: https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#manual-instrumentation, however it is handled as a Time here:

@start_time.to_i * 1000000000 + @start_time.nsec

Passing as an integer causes error on the nsec field request.

I think the docs should be updated to note the correct type.

marcotc added a commit that referenced this issue Nov 30, 2020
Fixes #1264

This PR updates the required type for the `Datadog::Tracer#trace(start_time:)` option.

The type required is a Ruby [Time](https://ruby-doc.org/stdlib-2.7.2/libdoc/time/rdoc/Time.html) object, while the documentation erroneously requested an `Integer`.

As as follow up, I suggest we move most of this documentation to our published API docs: https://www.rubydoc.info/github/DataDog/dd-trace-rb/Datadog/Tracer#trace-instance_method. This allows us to keep the documentation close to implementation, and prevent information drift between the two.
marcotc added a commit that referenced this issue Dec 2, 2020
Fixes #1264

This PR updates the required type for the `Datadog::Tracer#trace(start_time:)` option.

The type required is a Ruby [Time](https://ruby-doc.org/stdlib-2.7.2/libdoc/time/rdoc/Time.html) object, while the documentation erroneously requested an `Integer`.

As as follow up, I suggest we move most of this documentation to our published API docs: https://www.rubydoc.info/github/DataDog/dd-trace-rb/Datadog/Tracer#trace-instance_method. This allows us to keep the documentation close to implementation, and prevent information drift between the two.
@marcotc marcotc added this to the 0.44.0 milestone Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants