Skip to content

Commit

Permalink
unmask part of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdel committed Sep 9, 2023
1 parent e5e386d commit 1b70e2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/o11y.ex
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ defmodule O11y do

def set_masked_attribute(key, value) do
masked_value = String.replace(value, ~r/./, "*")
unmasked_value = String.slice(value, -8..-1)
masked_value = masked_value <> unmasked_value

set_attribute(key, masked_value)
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ defmodule Pears.MixProject do
{:fun_with_flags, "~> 1.10"},
{:fun_with_flags_ui, "~> 0.8.1"},
{:hammox, "~> 0.7.0"},
{:opentelemetry_exporter, "~> 1.5"},
{:opentelemetry, "~> 1.3"},
{:opentelemetry_api, "~> 1.2"},
{:opentelemetry_exporter, "~> 1.5"},
{:opentelemetry_log_exporter, "~> 0.5.0"},
{:opentelemetry_ecto, "~> 1.1"},
{:open_telemetry_decorator, "~> 1.4"},
Expand Down

0 comments on commit 1b70e2a

Please sign in to comment.