Created
July 13, 2020 05:32
-
-
Save yatender-oktalk/ccf75e094026f87c040a7431578f0d29 to your computer and use it in GitHub Desktop.
open-telemetry-demo---apps---application.ex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Alpha.Application do | |
... | |
def start(_type, _start) do | |
_ = OpenTelemetry.register_application_tracer(:alpha) | |
children = [ | |
# Starts a worker by calling: Alpha.Worker.start_link(arg) | |
# {Alpha.Worker, arg} | |
] | |
# See https://hexdocs.pm/elixir/Supervisor.html | |
# for other strategies and supported options | |
opts = [strategy: :one_for_one, name: Alpha.Supervisor] | |
Supervisor.start_link(children, opts) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Beta.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
def start(_type, _args) do | |
_ = OpenTelemetry.register_application_tracer(:beta) | |
children = [ | |
# Starts a worker by calling: Beta.Worker.start_link(arg) | |
# {Beta.Worker, arg} | |
] | |
# See https://hexdocs.pm/elixir/Supervisor.html | |
# for other strategies and supported options | |
opts = [strategy: :one_for_one, name: Beta.Supervisor] | |
Supervisor.start_link(children, opts) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Charlie.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
def start(_type, _args) do | |
_ = OpenTelemetry.register_application_tracer(:charlie) | |
children = [ | |
# Starts a worker by calling: Charlie.Worker.start_link(arg) | |
# {Charlie.Worker, arg} | |
] | |
# See https://hexdocs.pm/elixir/Supervisor.html | |
# for other strategies and supported options | |
opts = [strategy: :one_for_one, name: Charlie.Supervisor] | |
Supervisor.start_link(children, opts) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment