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

1.0 upgrade guide restructure #1914

Merged
merged 3 commits into from
Feb 28, 2022
Merged

Conversation

delner
Copy link
Contributor

@delner delner commented Feb 17, 2022

To try to improve comprehension and ease of use, I've restructured the 1.0 upgrade guide a bit here.

  • Table of contents at beginning outlines a Basic usage and Advanced usage path.
  • Reorganized some existing sections
  • Added Trace API section with table of common mappings.
  • Rewrote Namespacing section, added table.
  • Updated code blocks for improved legibility.
  • Fixed some errors in examples
  • Changed anchors to prefix with 1.0 (for future-proofing)

@delner delner added the docs Involves documentation label Feb 17, 2022
@delner delner added this to the 1.0.0.beta2 milestone Feb 17, 2022
@delner delner self-assigned this Feb 17, 2022
@delner delner requested a review from a team February 17, 2022 21:20
@delner delner force-pushed the docs/1.0-upgrade-guide-restructure branch from 0903139 to 5e68612 Compare February 17, 2022 21:55
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2022

Codecov Report

Merging #1914 (1daa257) into master (92a3631) will decrease coverage by 0.00%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1914      +/-   ##
==========================================
- Coverage   97.51%   97.51%   -0.01%     
==========================================
  Files        1001     1000       -1     
  Lines       48795    48787       -8     
==========================================
- Hits        47581    47573       -8     
  Misses       1214     1214              
Impacted Files Coverage Δ
lib/ddtrace.rb 100.00% <ø> (ø)
spec/ddtrace/auto_instrument_spec.rb 77.27% <ø> (-0.67%) ⬇️
lib/datadog/tracing/contrib/auto_instrument.rb 95.23% <90.00%> (ø)
lib/datadog/ci.rb 100.00% <100.00%> (ø)
lib/datadog/opentelemetry/extensions.rb 100.00% <100.00%> (ø)
lib/datadog/tracing/contrib.rb 100.00% <100.00%> (ø)
lib/datadog/tracing/contrib/extensions.rb 100.00% <100.00%> (ø)
lib/ddtrace/auto_instrument.rb 100.00% <100.00%> (ø)
lib/ddtrace/auto_instrument_base.rb

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update defd310...1daa257. Read the comment docs.

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! I've did an extensive read-through of it again, and left a lot of suggestions. I think all the time we're putting into this guide is worth it, as it will mean less work for customers and a silky-smooth upgrade experience.

docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved
@delner delner force-pushed the docs/1.0-upgrade-guide-restructure branch 3 times, most recently from 384ed30 to fdc0594 Compare February 22, 2022 20:13
@delner delner added this to Review in progress in 1.0 Feb 22, 2022
@delner delner force-pushed the docs/1.0-upgrade-guide-restructure branch from fdc0594 to 1daa257 Compare February 24, 2022 16:40
@delner delner force-pushed the docs/1.0-upgrade-guide-restructure branch from 1daa257 to 721ab5d Compare February 24, 2022 18:06
Comment on lines +7 to +9
**How to upgrade basic usage**

Here's a list of the most common changes you may encounter:
For users with a basic implementation (configuration file + out-of-the-box instrumentation), only minor changes to your configuration file are required: most applications take just minutes to update. Check out the following sections for a step-by-step guide.
Copy link
Member

Choose a reason for hiding this comment

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

I'm still quite unconvinced with the use of the word basic. Since you didn't like my suggestion of standard, I've gotten my thesaurus out and here's a few more suggestions: base, common, simple, typical, regular, bourgeois, philistine.

All of them I think don't carry the weird connotations that sometimes get attached to basic 😄

docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Outdated Show resolved Hide resolved

### Removed `Datadog.tracer`
<h1 id="1.0-basic-upgrade">Upgrading basic usage</h1>
Copy link
Member

Choose a reason for hiding this comment

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

It's a bit weird that while this document (UpgradeGuide.md) seems like it's making space for future upgrades to be included as well, most sections are using h1's, aka putting stuff on the top-level structure.

Should we make this document just the 1.x upgrade guide? In that case, it makes sense to keep the h1s. Otherwise, should everything below "From 0.x to 1.0" become an h2?

docs/UpgradeGuide.md Show resolved Hide resolved
Comment on lines +283 to +295
Also check out the functions defined within `Datadog::Tracing` in our [public API](https://www.rubydoc.info/gems/ddtrace/) for more details on their usage.

<h3 id="1.0-trace-api-removed-tracer">Removed `Datadog.tracer`</h3>

Many of the functions accessed directly through `Datadog.tracer` have been moved to `Datadog::Tracing` instead.

<h3 id="1.0-trace-api-removed-context">Removed access to `Datadog::Context`</h3>

Manual tracing is now done through the public API.
Direct usage of `Datadog::Context` has been removed. Previously, it was used to modify or access active trace state. Most use cases have been replaced by our [public trace API](https://www.rubydoc.info/gems/ddtrace/).

Whereas in 0.x, the block would yield a `Datadog::Span` as `span`, in 1.0, the block yields a `Datadog::SpanOperation` as `span` and `Datadog::TraceOperation` as `trace`.
<h3 id="1.0-trace-api-manual-tracing">Manual tracing & trace model</h3>

Manual tracing is now done through the [public API](https://www.rubydoc.info/gems/ddtrace/).
Copy link
Member

Choose a reason for hiding this comment

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

The rubydoc.info site hasn't yet been updated with 1.0.0.beta1 (probably only indexes non-beta versions?) but I think it would be nice to update this document after release with deeper links to specific classes/parts of the API. (So not for this PR, just a suggestion for a later improvement)


Direct usage of `Datadog::Context` has been removed. Previously, it was used to modify or access active trace state. Most use cases have been replaced by our public trace API.

<h3 id="1.0-trace-api-manual-tracing">Manual tracing & trace model</h3>

Manual tracing is now done through the public API.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm I've reviewed the change and I still think it's not as clear is it could be. It's now "the block would provide" and "the block provides", where it's actually the reverse: the block gets provided/called -- it's on the receiving end, not on the supplying end.

docs/UpgradeGuide.md Outdated Show resolved Hide resolved
docs/UpgradeGuide.md Show resolved Hide resolved

<h3 id="1.0-trace-api-removed-tracer">Removed `Datadog.tracer`</h3>

Many of the functions accessed directly through `Datadog.tracer` have been moved to `Datadog::Tracing` instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to point to some other part of the document (appendix?) to easily jump to a definitive reference to what has been moved? Or maybe to the class on rubydoc.info?

Copy link
Contributor Author

@delner delner Feb 28, 2022

Choose a reason for hiding this comment

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

The guide has the Trace API which has a table that outlines most API usage and the equivalent. I opted to put this inline rather than as a reference in the appendix.

My thinking was putting critical info (that isn't overwhelming) in the main body minimizes jumps and keeps flow/orientation smooth. Any tabular information that is both 1) verbose/detail oriented, 2) not-always-applicable can be demoted to an appendix section to reduce length and improve readability.

Copy link
Contributor

@lloeki lloeki left a comment

Choose a reason for hiding this comment

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

Overall a good improvement, I feel it does make things a bot more approachable and "drillable" so to speak.

@delner delner force-pushed the docs/1.0-upgrade-guide-restructure branch from 721ab5d to c49296f Compare February 28, 2022 14:28
@delner delner merged commit 09a717e into master Feb 28, 2022
@delner delner deleted the docs/1.0-upgrade-guide-restructure branch February 28, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Involves documentation
Projects
1.0
Review in progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants