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

[Meta] Make the "Roll the dice" application the default sample application #2623

Closed
11 tasks done
svrnm opened this issue Apr 24, 2023 · 10 comments
Closed
11 tasks done
Assignees
Labels
0-meta enhancement New feature or request help wanted Extra attention is needed

Comments

@svrnm
Copy link
Member

svrnm commented Apr 24, 2023

The Python Getting Started has a very simple but great sample application, where instead of just giving back a "hello world", it rolls a virtual dice and returns the value of that. I think we should use that as a sample for ALL of our getting started guides, because later in the manual instrumentation it can be used to add some custom stuff easily:

  • Custom span attribute for the number rolled
  • Some custom metrics for the numbers rolled individually & totally
  • We can add logs (see java example) easily, which for example is not given with the grpc sample

I created 2 updated version for Node.JS & Java:

#2624
#2625

For Java the additional advantage is that we can show logs, which is not available for the gRPC sample used

Background:
This is inspired by the work we did for the talk we did during KubeCon EU (see the sample app here) and I wanted to give some of that back to the docs. We might even consider to build on top of that in the Operator Docs, but that's another discussion)

--

Tracking:

This was referenced Apr 24, 2023
@austinlparker
Copy link
Member

sgtm. ++ consistency

@cartermp
Copy link
Contributor

Yep let's do that

@svrnm svrnm added help wanted Extra attention is needed enhancement New feature or request 0-meta labels Apr 24, 2023
@svrnm svrnm changed the title Make the "Roll the dice" application the default sample application [Meta] Make the "Roll the dice" application the default sample application Apr 24, 2023
@tsloughter
Copy link
Member

+1 I already implemented this and planned to introduce it into the Erlang/Elixir docs soon. Had been meaning to check if there was desire to make it the default used by all languages :)

@tsloughter
Copy link
Member

Including a client would be nice. It may be too much for the docs but to have in the examples for each language would at least be useful.

@svrnm
Copy link
Member Author

svrnm commented May 2, 2023

Including a client would be nice. It may be too much for the docs but to have in the examples for each language would at least be useful.

what do you mean by a client? A small app that calls that particular service? What would be the advantage over simply using curl?

@tsloughter
Copy link
Member

Yes, a small http app in the language that calls the dice server. It would demonstrate propagation. Again, I could see it being more code and concepts than is wanted in a "getting started" page.

@svrnm
Copy link
Member Author

svrnm commented May 3, 2023

Agreed, for the getting started it might be "too much code", but I think for further pages around context propagation, etc having a second component in the mix would be helpful. My thought was to eventually reproduce some parts of what we did here (a frontend calling 2 backends rolling the dice, and then comparing results and announce a winner), but a 2 tier (client->server) would be a little bit simpler.

@pellared
Copy link
Member

pellared commented Sep 6, 2023

I can try doing it for Go (assigning myself).

EDIT: I created open-telemetry/opentelemetry-go#4531

@svrnm
Copy link
Member Author

svrnm commented Oct 4, 2023

All done except C++ 🎉

@svrnm
Copy link
Member Author

svrnm commented Feb 9, 2024

We did it, all Getting Started guides now use the sample example 🎉

There is still a lot of work that needs to be done, but I will close this issue to anticipate that accomplishement

@svrnm svrnm closed this as completed Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-meta enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants