Skip to content

chore(hooks_processor): Do not log internal requests #411

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule HooksProcessor.Clients.RBACClient do
@grpc_timeout 5_000

def member?(org_id, user_id) do
Logger.info("Calling RBAC API to check membership: org_id: #{org_id} user_id: #{user_id}")
Logger.debug("Calling RBAC API to check membership: org_id: #{org_id} user_id: #{user_id}")

Metrics.benchmark("HooksProcessor.RBACClient", ["is_member?"], fn ->
%ListUserPermissionsRequest{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule HooksProcessor.Clients.UserClient do

def describe(user_id) do
"user_id: #{user_id}"
|> LT.info("Calling User API to find requester")
|> LT.debug("Calling User API to find requester")

Metrics.benchmark("HooksProcessor.UserClient", ["describe"], fn ->
%DescribeRequest{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ defmodule HooksProcessor.Hooks.Processing.GitWorker do

defp get_requester_id(webhook, email) do
"email: #{email}"
|> LT.info("Hook #{webhook.id} - calling User API to find requester")
|> LT.debug("Hook #{webhook.id} - calling User API to find requester")

case UserClient.describe_by_email(email) do
{:ok, user} ->
Expand All @@ -73,7 +73,7 @@ defmodule HooksProcessor.Hooks.Processing.GitWorker do

defp filter_membership(webhook, organization_id, user_id) do
"organization_id: #{organization_id}, user_id: #{user_id}"
|> LT.info("Hook #{webhook.id} - calling RBAC API to check membership")
|> LT.debug("Hook #{webhook.id} - calling RBAC API to check membership")

case RBACClient.member?(organization_id, user_id) do
{:ok, true} ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ defmodule HooksProcessor.Hooks.Processing.Utils do

def get_requester_id(webhook, provider_uid, provider_type) do
"provider_uid: #{provider_uid} for provider: #{provider_type}"
|> LT.info("Hook #{webhook.id} - calling User API to find requester")
|> LT.debug("Hook #{webhook.id} - calling User API to find requester")

case UserClient.describe_by_repository_provider(provider_uid, provider_type) do
{:ok, user} ->
Expand Down