From 006135de35a5410dc7c03a62990c3283167cda56 Mon Sep 17 00:00:00 2001 From: alafanechere Date: Fri, 16 Dec 2022 22:10:04 +0100 Subject: [PATCH 1/2] tag additional routes --- .../airbyte/server/handlers/OAuthHandler.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java b/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java index 1d1517fd444d..7618025a6fd5 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java @@ -116,8 +116,10 @@ public OAuthConsentRead getSourceOAuthConsent(final SourceOauthConsentRequest so public OAuthConsentRead getDestinationOAuthConsent(final DestinationOauthConsentRequest destinationOauthConsentRequest) throws JsonValidationException, ConfigNotFoundException, IOException { - ApmTraceUtils.addTagsToTrace(Map.of(WORKSPACE_ID_KEY, destinationOauthConsentRequest.getWorkspaceId(), DESTINATION_DEFINITION_ID_KEY, - destinationOauthConsentRequest.getDestinationDefinitionId())); + final Map traceTags = Map.of(WORKSPACE_ID_KEY, destinationOauthConsentRequest.getWorkspaceId(), DESTINATION_DEFINITION_ID_KEY, + destinationOauthConsentRequest.getDestinationDefinitionId()); + ApmTraceUtils.addTagsToTrace(traceTags); + ApmTraceUtils.addTagsToRootSpan(traceTags); final StandardDestinationDefinition destinationDefinition = configRepository.getStandardDestinationDefinition(destinationOauthConsentRequest.getDestinationDefinitionId()); @@ -162,8 +164,10 @@ public OAuthConsentRead getDestinationOAuthConsent(final DestinationOauthConsent public Map completeSourceOAuth(final CompleteSourceOauthRequest completeSourceOauthRequest) throws JsonValidationException, ConfigNotFoundException, IOException { - ApmTraceUtils.addTagsToTrace(Map.of(WORKSPACE_ID_KEY, completeSourceOauthRequest.getWorkspaceId(), SOURCE_DEFINITION_ID_KEY, - completeSourceOauthRequest.getSourceDefinitionId())); + final Map traceTags = Map.of(WORKSPACE_ID_KEY, completeSourceOauthRequest.getWorkspaceId(), SOURCE_DEFINITION_ID_KEY, + completeSourceOauthRequest.getSourceDefinitionId()); + ApmTraceUtils.addTagsToTrace(traceTags); + ApmTraceUtils.addTagsToRootSpan(traceTags); final StandardSourceDefinition sourceDefinition = configRepository.getStandardSourceDefinition(completeSourceOauthRequest.getSourceDefinitionId()); @@ -210,8 +214,10 @@ public Map completeSourceOAuth(final CompleteSourceOauthRequest public Map completeDestinationOAuth(final CompleteDestinationOAuthRequest completeDestinationOAuthRequest) throws JsonValidationException, ConfigNotFoundException, IOException { - ApmTraceUtils.addTagsToTrace(Map.of(WORKSPACE_ID_KEY, completeDestinationOAuthRequest.getWorkspaceId(), DESTINATION_DEFINITION_ID_KEY, - completeDestinationOAuthRequest.getDestinationDefinitionId())); + final Map traceTags = Map.of(WORKSPACE_ID_KEY, completeDestinationOAuthRequest.getWorkspaceId(), SOURCE_DEFINITION_ID_KEY, + completeDestinationOAuthRequest.getDestinationDefinitionId()); + ApmTraceUtils.addTagsToTrace(traceTags); + ApmTraceUtils.addTagsToRootSpan(traceTags); final StandardDestinationDefinition destinationDefinition = configRepository.getStandardDestinationDefinition(completeDestinationOAuthRequest.getDestinationDefinitionId()); From de1026322a1d87ee8240e868ca5c964cacbb2270 Mon Sep 17 00:00:00 2001 From: alafanechere Date: Fri, 16 Dec 2022 22:22:41 +0100 Subject: [PATCH 2/2] tag additional routes --- .../src/main/java/io/airbyte/server/handlers/OAuthHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java b/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java index 7618025a6fd5..5e528cf5a230 100644 --- a/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java +++ b/airbyte-server/src/main/java/io/airbyte/server/handlers/OAuthHandler.java @@ -214,7 +214,7 @@ public Map completeSourceOAuth(final CompleteSourceOauthRequest public Map completeDestinationOAuth(final CompleteDestinationOAuthRequest completeDestinationOAuthRequest) throws JsonValidationException, ConfigNotFoundException, IOException { - final Map traceTags = Map.of(WORKSPACE_ID_KEY, completeDestinationOAuthRequest.getWorkspaceId(), SOURCE_DEFINITION_ID_KEY, + final Map traceTags = Map.of(WORKSPACE_ID_KEY, completeDestinationOAuthRequest.getWorkspaceId(), DESTINATION_DEFINITION_ID_KEY, completeDestinationOAuthRequest.getDestinationDefinitionId()); ApmTraceUtils.addTagsToTrace(traceTags); ApmTraceUtils.addTagsToRootSpan(traceTags);