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

Add a new Elixir example service #1511

Open
joshleecreates opened this issue Apr 8, 2024 · 5 comments · May be fixed by #1621
Open

Add a new Elixir example service #1511

joshleecreates opened this issue Apr 8, 2024 · 5 comments · May be fixed by #1621
Labels
enhancement New feature or request

Comments

@joshleecreates
Copy link
Contributor

Feature Request

Since the feature flag service was replaced with flagd, we need to provide an example erlang or elixir service, ideally one that is an optional sub component of the demo.

Additional Context

Previous discussion: #1343 (comment)

@joshleecreates joshleecreates added the enhancement New feature or request label Apr 8, 2024
@joshleecreates
Copy link
Contributor Author

Based on the latest discussions in this SIG and with the Erlang SIG, there is interest in exploring a chat application to show something Elixir-y with Phoenix Channels / Presence.

I put together a quick proof of concept adding otel instrumentation to this example chat app. This app uses Phoenix liveview to establish and render the initial page view, then uses a socket connection to a Phoenix channel for the chat messages.

The paths on phoenix liveview and ecto are already instrumented with the opentelemetry-erlang-contrib libraries, but the messages passed on the phoenix channel are not traced (automatically). It's easy enough to add traces manually. Adding auto-instrumentation for Phoenix channels to the contrib library may also be worthwhile (I'll open a separate issue to discuss this).

Questions to be answered:

  • Are we good with moving forward with a Phoenix-based chat application similar to this example? If yes:
  • Do we want to use Phoenix Liveview for rendering the chat chrome (maybe embedded with an iframe as suggested by @austinlparker) or support a JS frontend (or both)?
  • Are manual root spans on the socket messages ok for the time-being?
  • Maybe we could use span links to link all spans originating from the same socket connection?

@tsloughter
Copy link
Member

You mention iframe. So you are thinking it'd be one of those chats that can popup in the corner of a webpage?

@julianocosta89
Copy link
Member

You mention iframe. So you are thinking it'd be one of those chats that can popup in the corner of a webpage?

yep

@joshleecreates
Copy link
Contributor Author

I'm heading out on vacation for a week today but based on the conversation this week in the SIG meeting, next week I will refactor the example application into a PR. I will use manual instrumentation for now while the Elixir instrumentation issue makes its way through the process. I will use Ecto to store the messages in a Postgres database, but I will use the shell scripts created by @puckpuck for seeding the Postgres database. I think this service should probably also call another downstream service like perhaps ProductCatalogService.

@julianocosta89
Copy link
Member

@joshleecreates thanks for taking care of this.
I miss our Erlang/Elixir service 😅

I think adding a call from the chat app to the ProductCatalogService would be great, because than we can also demonstrate context propagation for Elixir.

@julianocosta89 julianocosta89 linked a pull request Jul 11, 2024 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants