Skip to content

Commit

Permalink
credo
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ruoss committed Feb 20, 2022
1 parent 4867a41 commit 652abfa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/k8s/sys/open_telemetry.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
defmodule K8s.Sys.OpenTelemetry do
@moduledoc "Converts telemetry spans to opentelemetry tracing spans"

@doc """
Attaches telemetry spans to the opentelemetry processor
"""
@spec attach() :: :ok
def attach() do
def attach do
for span <- K8s.Sys.Telemetry.spans() do
span_name = Enum.join(span, ".")

Expand Down
5 changes: 4 additions & 1 deletion lib/k8s/sys/spandex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ defmodule K8s.Sys.Spandex do

require Spandex

@doc """
Attaches telemetry spans to the spandex processor
"""
@spec attach(atom()) :: :ok
def attach(tracer) do
for span <- K8s.Sys.Telemetry.spans() do
Expand Down Expand Up @@ -68,7 +71,7 @@ defmodule K8s.Sys.Spandex do
%{type: :stop, tracer: tracer}
) do
tracer.update_span(tags: Map.to_list(metadata))
tracer.finish_span() |> IO.inspect()
tracer.finish_span()
:ok
end

Expand Down

0 comments on commit 652abfa

Please sign in to comment.