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

chore(docs): Update getting started to not use Bandit as it is not re… #5142

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions content/en/docs/languages/erlang/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,9 @@ We'll need a few other dependencies that Phoenix doesn't come with.
OpenTelemetry Collector and/or to self-hosted or commercial services.
- `opentelemetry_phoenix`: creates OpenTelemetry spans from the Elixir
`:telemetry` events created by Phoenix.
- web server dependencies: There are currently two options for web servers and
each has their telemetry counterpart. Phoenix applications post 1.7.11 default
to Bandit while pre 1.7.11 default to Cowboy. Both choices are valid. Use one
of the below options based on the web server your Phoenix application uses:
- `opentelemetry_cowboy`: creates OpenTelemetry spans from the Elixir
`:telemetry` events created by the Cowboy web server
- `opentelemetry_bandit`: creates OpenTelemetry spans from the Elixir
`:telemetry` events created by the Bandit web server
- `opentelemetry_cowboy`: creates OpenTelemetry spans from the Elixir
`:telemetry` events created by the Cowboy web server (which is used by
Phoenix).
pdgonzalez872 marked this conversation as resolved.
Show resolved Hide resolved

```elixir
# mix.exs
Expand All @@ -69,10 +64,7 @@ def deps do
{:opentelemetry_api, "~> {{% param versions.otelApi %}}"},
{:opentelemetry_exporter, "~> {{% param versions.otelExporter %}}"},
{:opentelemetry_phoenix, "~> {{% param versions.otelPhoenix %}}"},
# for Cowboy
{:opentelemetry_cowboy, "~> {{% param versions.otelCowboy %}}"}
# for Bandit
{:opentelemetry_bandit, "~> {{% version-from-registry instrumentation-erlang-bandit %}}"},
{:opentelemetry_cowboy, "~> {{% param versions.otelCowboy %}}"},
{:opentelemetry_ecto, "~> {{% param versions.otelEcto %}}"} # if using ecto
]
end
Expand All @@ -84,12 +76,8 @@ The last three also need to be setup when your application starts:
# application.ex
@impl true
def start(_type, _args) do
# Depending on what webserver you are using, you will either use:
:opentelemetry_cowboy.setup()
OpentelemetryPhoenix.setup(adapter: :cowboy2)
# or
OpentelemetryBandit.setup()
OpentelemetryPhoenix.setup(adapter: :bandit)
OpentelemetryEcto.setup([:dice_game, :repo]) # if using ecto
end
```
Expand Down