Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

docs: Format example for tracer.startActiveSpan #101

Merged
merged 3 commits into from Jul 26, 2021

Conversation

ad-m
Copy link
Contributor

@ad-m ad-m commented Jul 8, 2021

Example in documentation fro tracer.startActiveSpan is misformated:

image

That PR is gonna fix that:

image

I have doubts whether the second example - although technically correct - is optimal for promotion and indication in the documentation.

@naseemkullah
Copy link
Member

I have doubts whether the second example - although technically correct - is optimal for promotion and indication in the documentation.

The idea was to highlight that you could return the span if you wanted to continue to manage it outside of the function, but improvements to the examples are always welcome!

@codecov
Copy link

codecov bot commented Jul 8, 2021

Codecov Report

Merging #101 (b7cc2a8) into main (1fa6248) will not change coverage.
The diff coverage is n/a.

❗ Current head b7cc2a8 differs from pull request most recent head c452067. Consider uploading reports for the commit c452067 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main     #101   +/-   ##
=======================================
  Coverage   94.90%   94.90%           
=======================================
  Files          42       42           
  Lines         569      569           
  Branches       89       89           
=======================================
  Hits          540      540           
  Misses         29       29           

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 1fa6248...c452067. Read the comment docs.

@rauno56
Copy link
Member

rauno56 commented Jul 20, 2021

I have doubts whether the second example - although technically correct - is optimal for promotion and indication in the documentation.

The idea was to highlight that you could return the span if you wanted to continue to manage it outside of the function, but improvements to the examples are always welcome!

OP didn't mean a conceptual change. Only formatting!
Thanks, @ad-m!

Doesn't have to be in this PR, but I personally appreciate examples that run more than pseudo-code ones. Making minimal changes(console.log'ing instead of "do some work" and throwing etc.) could make this look a little better.

@ad-m
Copy link
Contributor Author

ad-m commented Jul 21, 2021

OP didn't mean a conceptual change. Only formatting!

I perceive that PR as only formatting change.

Despite of that I added side note about second example, but I believe it is out of scope of that PR.

The idea was to highlight that you could return the span if you wanted to continue to manage it outside of the function, but improvements to the examples are always welcome!

Thanks for the clarification. This may actually be useful on rare occasions.

@naseemkullah
Copy link
Member

I have doubts whether the second example - although technically correct - is optimal for promotion and indication in the documentation.

The idea was to highlight that you could return the span if you wanted to continue to manage it outside of the function, but improvements to the examples are always welcome!

OP didn't mean a conceptual change. Only formatting!

While their PR targets formatting they also inquired about the second example (conceptually) :)

Doesn't have to be in this PR, but I personally appreciate examples that run more than pseudo-code ones. Making minimal changes(console.log'ing instead of "do some work" and throwing etc.) could make this look a little better.

Yep, up for a PR?

@dyladan dyladan added the documentation Improvements or additions to documentation label Jul 26, 2021
@dyladan dyladan merged commit 6dd34e2 into open-telemetry:main Jul 26, 2021
@ad-m ad-m deleted the fix-example branch July 26, 2021 21:45
@ad-m
Copy link
Contributor Author

ad-m commented Jul 26, 2021

Thanks for your cooperation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants