Skip to content

Commit

Permalink
feat(rust): send telemetry data to the project node
Browse files Browse the repository at this point in the history
| Conflicts:
|	implementations/rust/ockam/ockam_command/src/node/create.rs
  • Loading branch information
etorreborre committed Feb 18, 2025
1 parent ce82cfc commit 21125ec
Show file tree
Hide file tree
Showing 30 changed files with 516 additions and 137 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,9 @@ insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset

# identity.id test file
[*.id]
charset = ""
end_of_line = unset
insert_final_newline = unset
46 changes: 43 additions & 3 deletions implementations/elixir/ockam/ockam_cloud_node/config/runtime.exs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ config :ockam_services,
# discovery service
Ockam.Services.Provider.Discovery,
# proxies for remote services
Ockam.Services.Provider.Proxy,
# proxies to services in other nodes
Ockam.Services.Provider.Sidecar
Ockam.Services.Provider.Proxy
],
services: services

Expand Down Expand Up @@ -185,3 +183,45 @@ config :logger, :console,
metadata: [:module, :line, :pid],
format_string: "$dateT$time $metadata[$level] $message\n",
format: {Ockam.CloudNode.LogFormatter, :format}

if Mix.env() == :test do
config :logger, level: :debug

opentelemetry_proxy_service =
if System.get_env("OCKAM_OPENTELEMETRY_ENDPOINT", nil) != nil do
grpc_endpoint = System.get_env("OCKAM_OPENTELEMETRY_ENDPOINT")

[
{:echo,
[
address: "echo",
log_level: :debug,
authorization: []
]},
{:grpc_forwarder,
[
address: "grpc_forwarder",
grpc_endpoint: grpc_endpoint,
authorization: []
]}
]
else
[]
end

config :ockam_services,
service_providers: [
Ockam.Services.Provider.Routing,
Ockam.Services.Provider.SecureChannel,
Ockam.Services.Provider.Proxy
],
services: opentelemetry_proxy_service

config :ockam_metrics,
start_telemetry_poller: false

config :ockam, identity_module: Ockam.Identity.Stub

config :ockam_cloud_node,
storage_path: "./test"
end
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ defmodule Ockam.CloudNode do
[]
end

{nil, nil} ->
[]

_other ->
Logger.info(
"Invalid cleanup config: #{inspect(crontab)} : #{inspect(idle_timeout)}. Ignoring"
Expand Down
9 changes: 9 additions & 0 deletions implementations/elixir/ockam/ockam_cloud_node/mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"ex_doc": {:hex, :ex_doc, "0.31.0", "06eb1dfd787445d9cab9a45088405593dd3bb7fe99e097eaa71f37ba80c7a676", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "5350cafa6b7f77bdd107aa2199fe277acf29d739aba5aee7e865fc680c62a110"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
"finch": {:hex, :finch, "0.19.0", "c644641491ea854fc5c1bbaef36bfc764e3f08e7185e1f084e35e0672241b76d", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.6.2 or ~> 1.7", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 1.1", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "fc5324ce209125d1e2fa0fcd2634601c52a787aff1cd33ee833664a5af4ea2b6"},
"gen_state_machine": {:hex, :gen_state_machine, "3.0.0", "1e57f86a494e5c6b14137ebef26a7eb342b3b0070c7135f2d6768ed3f6b6cdff", [:mix], [], "hexpm", "0a59652574bebceb7309f6b749d2a41b45fdeda8dbb4da0791e355dd19f0ed15"},
"gettext": {:hex, :gettext, "0.19.1", "564953fd21f29358e68b91634799d9d26989f8d039d7512622efb3c3b1c97892", [:mix], [], "hexpm", "10c656c0912b8299adba9b061c06947511e3f109ab0d18b44a866a4498e77222"},
"grpc": {:hex, :grpc, "0.9.0", "1b930a57272d4356ea65969b984c2eb04f3dab81420e1e28f0e6ec04b8f88515", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:cowboy, "~> 2.10", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowlib, "~> 2.12", [hex: :cowlib, repo: "hexpm", optional: false]}, {:gun, "~> 2.0", [hex: :gun, repo: "hexpm", optional: false]}, {:jason, ">= 0.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mint, "~> 1.5", [hex: :mint, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.11", [hex: :protobuf, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7c059698248738fcf7ad551f1d78f4a3d2e0642a72a5834f2a0b0db4b9f3d2b5"},
"gun": {:hex, :gun, "2.0.1", "160a9a5394800fcba41bc7e6d421295cf9a7894c2252c0678244948e3336ad73", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}], "hexpm", "a10bc8d6096b9502205022334f719cc9a08d9adcfbfc0dbee9ef31b56274a20b"},
"hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~>2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~>6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~>1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~>1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~>1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"},
"hex2bin": {:hex, :hex2bin, "1.0.0", "aac26eab998ae80eacee1c7607c629ab503ebf77a62b9242bae2b94d47dcb71e", [:rebar3], [], "hexpm", "e7012d1d9aadd26e680f0983d26fb8923707f05fac9688f19f530fa3795e716f"},
"hkdf_erlang": {:hex, :hkdf_erlang, "1.0.0", "0b681b428805eacf1286e02ece8617e843cdceae7adb5fad43c283c98088fbc2", [:rebar3], [], "hexpm", "d2091d9e0df97613fd149074929a94e3675047f28cca6b1626fe7be60f5d76ac"},
"hpax": {:hex, :hpax, "1.0.2", "762df951b0c399ff67cc57c3995ec3cf46d696e41f0bba17da0518d94acd4aac", [:mix], [], "hexpm", "2f09b4c1074e0abd846747329eaa26d535be0eb3d189fa69d812bfb8bfefd32f"},
"httpoison": {:hex, :httpoison, "2.1.0", "655fd9a7b0b95ee3e9a3b535cf7ac8e08ef5229bab187fa86ac4208b122d934b", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "fc455cb4306b43827def4f57299b2d5ac8ac331cb23f517e734a4b78210a160c"},
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
Expand All @@ -32,14 +36,19 @@
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
"mime": {:hex, :mime, "2.0.2", "0b9e1a4c840eafb68d820b0e2158ef5c49385d17fb36855ac6e7e087d4b1dcc5", [:mix], [], "hexpm", "e6a3f76b4c277739e36c2e21a2c640778ba4c3846189d5ab19f97f126df5f9b7"},
"mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"},
"mint": {:hex, :mint, "1.7.1", "113fdb2b2f3b59e47c7955971854641c61f378549d73e829e1768de90fc1abf1", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1 or ~> 0.2.0 or ~> 1.0", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "fceba0a4d0f24301ddee3024ae116df1c3f4bb7a563a731f45fdfeb9d39a231b"},
"neotoma": {:git, "https://github.com/seancribbs/neotoma.git", "9e57d8ebd4ebb02c3e2428b08f3a01e2ff834ce2", []},
"nimble_options": {:hex, :nimble_options, "1.1.1", "e3a492d54d85fc3fd7c5baf411d9d2852922f66e69476317787a7b2bb000a61b", [:mix], [], "hexpm", "821b2470ca9442c4b6984882fe9bb0389371b8ddec4d45a9504f00a66f650b44"},
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
"nimble_pool": {:hex, :nimble_pool, "1.1.0", "bf9c29fbdcba3564a8b800d1eeb5a3c58f36e1e11d7b7fb2e084a643f645f06b", [:mix], [], "hexpm", "af2e4e6b34197db81f7aad230c1118eac993acc0dae6bc83bac0126d4ae0813a"},
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
"plug": {:hex, :plug, "1.14.0", "ba4f558468f69cbd9f6b356d25443d0b796fbdc887e03fa89001384a9cac638f", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "bf020432c7d4feb7b3af16a0c2701455cbbbb95e5b6866132cb09eb0c29adc14"},
"plug_cowboy": {:hex, :plug_cowboy, "2.5.2", "62894ccd601cf9597e2c23911ff12798a8a18d237e9739f58a6b04e4988899fe", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.7", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ea6e87f774c8608d60c8d34022a7d073bd7680a0a013f049fc62bf35efea1044"},
"plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"},
"poison": {:hex, :poison, "5.0.0", "d2b54589ab4157bbb82ec2050757779bfed724463a544b6e20d79855a9e43b24", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "11dc6117c501b80c62a7594f941d043982a1bd05a1184280c0d9166eb4d8d3fc"},
"protobuf": {:hex, :protobuf, "0.14.0", "75b64b8c1f0c833b5e76cd841d3448f077f655c2a2eed53358651fbfe4a6b70e", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "0f747eaa54ace9617536f1cb4b2a4962bc7e43f1aa475c6fa9c60079955c4cb0"},
"ranch": {:hex, :ranch, "2.1.0", "2261f9ed9574dcfcc444106b9f6da155e6e540b2f82ba3d42b339b93673b72a3", [:make, :rebar3], [], "hexpm", "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916"},
"req": {:hex, :req, "0.5.1", "90584216d064389a4ff2d4279fe2c11ff6c812ab00fa01a9fb9d15457f65ba70", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.17", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "7ea96a1a95388eb0fefa92d89466cdfedba24032794e5c1147d78ec90db7edca"},
"rustler": {:git, "https://github.com/polvorin/rustler.git", "f6ead5802b3b8bf38b3c5fcaf0a0dbdf0e66a221", [branch: "fix_local_crate", sparse: "rustler_mix"]},
"rustler_precompiled": {:hex, :rustler_precompiled, "0.7.1", "ecadf02cc59a0eccbaed6c1937303a5827fbcf60010c541595e6d3747d3d0f9f", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "b9e4657b99a1483ea31502e1d58c464bedebe9028808eda45c3a429af4550c66"},
"sched_ex": {:hex, :sched_ex, "1.1.4", "893de8ffcb1590ae6089d9862d49447fbb948535ba5777c231e55c8404bc3e6e", [:mix], [{:crontab, "~> 1.1.2", [hex: :crontab, repo: "hexpm", optional: false]}, {:timex, "~> 3.1", [hex: :timex, repo: "hexpm", optional: false]}], "hexpm", "f32336c40a62aba581c57d6d6009e40e5c52011bb8305fc3a33ef9e5815b861c"},
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I12dea6479e2ececa711851c371f7bc9c16a162cd34cfe096386a76222c736f69
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
��#!RCD_Ou����l���<5�;ɧ.
���
68 changes: 68 additions & 0 deletions implementations/elixir/ockam/ockam_cloud_node/test/start_node.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
defmodule Start do
@doc """
Start a local project node with the ability to create secure channels.
The node identity is either retrieved from files, or created then stored in files.
"""
def start_node() do
with {:ok, own_identity} <- get_or_create_identity(),
{:ok, keypair} <- Ockam.SecureChannel.Crypto.generate_dh_keypair(),
{:ok, attestation} <- Ockam.Identity.attest_purpose_key(own_identity, keypair) do
Ockam.Services.start_service(
:secure_channel,
identity: own_identity,
address: "api",
encryption_options: [static_keypair: keypair, static_key_attestation: attestation]
)
end
end

@doc """
Retrieve or create an identity
"""
def get_or_create_identity() do
case File.read(identity_path()) do
{:ok, bytes} ->
with {:ok, secret_bytes} <- File.read(secret_signing_key_path()),
{:ok, identity, _identifier} <- Ockam.Identity.import(bytes, secret_bytes) do
{:ok, identity}
end

{:error, :enoent} ->
with {_pub, secret} <- :crypto.generate_key(:eddsa, :ed25519),
{:ok, identity} <- Ockam.Identity.create(secret),
:ok <- File.mkdir_p(Path.dirname(identity_id_path())),
:ok <-
File.write(
identity_id_path(),
Ockam.Identity.Identifier.to_str(Ockam.Identity.get_identifier(identity))
),
:ok <- File.write(identity_path(), Ockam.Identity.get_data(identity)),
:ok <- File.write(secret_signing_key_path(), secret) do
{:ok, identity}
end
end
end

@doc """
File storing the identity identifier
"""
defp identity_id_path() do
Path.join(Application.fetch_env!(:ockam_cloud_node, :storage_path), "identity.id")
end

@doc """
File storing the identity change history
"""
defp identity_path() do
Path.join(Application.fetch_env!(:ockam_cloud_node, :storage_path), "identity")
end

@doc """
File storing the identity secret
"""
defp secret_signing_key_path() do
Path.join(Application.fetch_env!(:ockam_cloud_node, :storage_path), "identity.secret")
end
end

Start.start_node()
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ defmodule Ockam.Metrics.Application do
else
[]
end ++
telemetry_poller()
if Application.get_env(:ockam_metrics, :start_telemetry_poller, true) do
telemetry_poller()
else
[]
end

Supervisor.start_link(children, strategy: :one_for_one, name: __MODULE__)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
defmodule Ockam.Services.GrpcForwarder do
@moduledoc false

use Ockam.Worker

alias Ockam.Message
alias Ockam.Worker

require Logger

defmodule GrpcRequest do
@moduledoc """
gRPC request. This request is created by a grpcClient and can be forwarded to a gRPC server.
This struct is currently being used to receive telemetry data from another node via a secure channel
and forward it to an OpenTelemetry collector.
"""
use TypedStruct

typedstruct do
plugin(Ockam.TypedCBOR.Plugin)
field(:method, String.t(), minicbor: [key: 1])
field(:path, String.t(), minicbor: [key: 2])

field(:version, :http09 | :http10 | :http11 | :http2 | :http3,
minicbor: [key: 3, schema: {:enum, [http09: 0, http10: 1, http11: 2, http2: 3, http3: 4]}]
)

field(:headers, list(list(String.t())), minicbor: [key: 4])
field(:body, :binary, minicbor: [key: 5])
end
end

@doc """
Start the service by opening a channel to the grpc endpoint.
"""
@impl true
def setup(options, state) do
grpc_endpoint = Keyword.get(options, :grpc_endpoint, "http://localhost:4317")
{:ok, channel} = GRPC.Stub.connect(grpc_endpoint)
Logger.debug("Starting a grpc forwarder to: #{grpc_endpoint}")

state =
state
|> Map.put(:grpc_endpoint, grpc_endpoint)
|> Map.put(:channel, channel)

{:ok, state}
end

@doc """
A message sent to this service is first encoded as an Ockam Request, where the body of the request is the gRPC request.
In order to forward that request to the grpc endpoint, we need to act as a gRPC client and:
- Set the appropriate gRPC headers
- Pass the request path (it should look like `opentelemetry.proto.collector.trace.v1.TraceService/Export`).
In principle the gRPC request could specify a method other than POST but for now we only support POST.
We eventually send a reply with an empty body. In a general case, we should provide a better reply but for our
current telemetry use case this is good enough.
"""
@impl true
def handle_message(message, state) do
{:ok, decoded_request} = Ockam.API.Request.decode(message.payload)
{:ok, grpc_request, _unused} = GrpcRequest.decode(decoded_request.body)

channel = Map.get(state, :channel)

headers =
GRPC.Transport.HTTP2.client_headers_without_reserved(%{
channel: channel,
codec: channel.codec,
compressor: GRPC.Compressor.Gzip,
accepted_compressors: nil,
headers: grpc_request.headers |> Enum.map(fn [a, b] -> {a, b} end)
})

:gun.post(channel.adapter_payload.conn_pid, grpc_request.path, headers, grpc_request.body)

reply = Message.reply(message, state.address, <<>>)
Worker.route(reply, state)

{:ok, state}
end

@impl true
def handle_info(_unused, state) do
{:noreply, state}
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defmodule Ockam.Services.Provider.Routing do

alias Ockam.Services.Echo, as: EchoService
alias Ockam.Services.Forwarding, as: ForwardingService
alias Ockam.Services.GrpcForwarder
alias Ockam.Services.PubSub, as: PubSubService
alias Ockam.Services.Relay.StaticForwarding
alias Ockam.Services.Relay.StaticForwardingAPI
Expand All @@ -20,7 +21,8 @@ defmodule Ockam.Services.Provider.Routing do
:static_forwarding,
:static_forwarding_api,
:pub_sub,
:tracing
:tracing,
:grpc_forwarder
]

@impl true
Expand Down Expand Up @@ -65,4 +67,9 @@ defmodule Ockam.Services.Provider.Routing do
def child_spec(:tracing, args) do
{TracingService, Keyword.merge([address: "tracing"], args)}
end

@impl true
def child_spec(:grpc_forwarder, args) do
{GrpcForwarder, Keyword.merge([address: "grpc_forwarder"], args)}
end
end
2 changes: 2 additions & 0 deletions implementations/elixir/ockam/ockam_services/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ defmodule Ockam.Services.MixProject do
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev], runtime: false},
{:ex_doc, "~> 0.25", only: :dev, runtime: false},
{:grpc, "~> 0.9.0"},
{:gun, "~> 2.0"},
{:ockam, path: "../ockam"},
{:ockam_metrics, path: "../ockam_metrics"},
{:ockam_abac, path: "../ockam_abac"},
Expand Down
Loading

0 comments on commit 21125ec

Please sign in to comment.