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

[docs] New quickstart page #2895

Closed
wants to merge 17 commits into from
Closed

[docs] New quickstart page #2895

wants to merge 17 commits into from

Conversation

cartermp
Copy link
Contributor

@cartermp cartermp commented May 10, 2022

So, this is, uhh, a big change. I chatted with @austinlparker who wrote this article first, and he said we should rewrite it. So that's what this is!

Background: there's an effort in docs to standardize on how we do "get started" across the languages. In broad strokes:

  • Get autoinstrumentation/instrumentation libs (whatever is best for the language) wired up to an HTTP server using the console exporter
  • Augment that with a smidge of manual instrumentation
  • Show how to spin up a local collector and send data to it
  • Link to the other articles that go into more detail about automatic instrumentation/libraries, manual instrumentation, and exporting data

The otel-go getting started page is next up in this set of changes.

The approach I took here is sort of verbose - adding to the same bit of code a few times and showing the full sample in each relevant section. I think there's a benefit to that, in that at any given stage you have a fully working sample you can copy-paste into a file and run. But it does make the doc and changes larger. I am happy to consider alternatives.

@chalin, @svrnm, @austinlparker, @avillela -- would be good to get your eyes here as well. I validated that this works with no broken links in a local build of the website with these changes.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 10, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@avillela
Copy link

Added a couple of comments just to help clarify the narrative a bit more. Coming from the viewpoint of OTel noob who is desperately searching for a step-by-step example.

I did try out all 3 scenarios myself. Pretty solid overall!

@hanyuancheung hanyuancheung added Skip Changelog PRs that do not require a CHANGELOG.md entry documentation Provides helpful information labels May 11, 2022
Copy link
Contributor

@MadVikingGod MadVikingGod left a comment

Choose a reason for hiding this comment

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

Thank you for building a working example.

website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Show resolved Hide resolved
Copy link
Contributor

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

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

I like the update to the guide and the effort to standardise across instrumentation. Thanks @cartermp for the effort on this. I have some comments inline.

One other thing. I wonder is it worth keeping the example in the current quick start guide somewhere for reference? There is good content in it also.

website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
@hanyuancheung hanyuancheung requested a review from dmathieu as a code owner May 20, 2022 07:20
Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

Thanks @cartermp! See inline comments.

website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
cartermp and others added 3 commits May 21, 2022 08:09
Co-authored-by: Patrice Chalin <chalin@users.noreply.github.com>
Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Copy link
Contributor

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

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

@cartermp
Copy link
Contributor Author

@hickeyma Yep! Will be addressing this soon. Still recovering from jetlag 🙂

Copy link
Member

@austinlparker austinlparker left a comment

Choose a reason for hiding this comment

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

Left a couple of nits, but I went through the whole thing and it worked fine as written.

website_docs/getting-started.md Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
@austinlparker
Copy link
Member

Hey folks! Added a couple of little nitpicky comments, but I also ran through this whole thing stem to stern and it works on my machine ™️. Could we get this merged in so it can be brought into the page?

Copy link
Contributor

@hickeyma hickeyma left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for all the effort on this @cartermp

Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

Anything left to do here? Thanks for the revisions @cartermp.

website_docs/getting-started.md Outdated Show resolved Hide resolved
website_docs/getting-started.md Outdated Show resolved Hide resolved
Comment on lines +724 to +730
exporter, err :=
otlptracehttp.New(ctx,
// WithInsecure lets us use http instead of https.
// This is just for local development.
otlptracehttp.WithInsecure(),
otlptracehttp.WithEndpoint(collectorAddr),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This snippet makes a number of changes to things outside of just what is shown here. Mainly there is now a context that is part of the initialization func.

This makes this block not copy and pasteable like previous ones. I am ok with that but the supporting text probably should warn someone of this pitfall.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I originally didn't include it but got feedback to have this snippet in here before the full sample that should be copy/paste-able. I'm fine with either approach.

@MadVikingGod
Copy link
Contributor

Sorry that this has fallen through the cracks. If I get time at the end of the day I will try and merge the last touches and just open an issue to resolve anything outstanding.

cartermp and others added 3 commits June 21, 2022 09:05
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Co-authored-by: Aaron Clawson <3766680+MadVikingGod@users.noreply.github.com>
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

Similar to the existing documentation, can you please add a working and complete example of code being constructed here as compilable code in the examples directory?

This helps users by having a working example and it will help in review of these docs. There are many idiomatic Go issues with the code highlighted here that would be easier to point out if the example existed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Provides helpful information Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants