From c3253da9d8d3512e8e3fa7f67432d62a5dd755a7 Mon Sep 17 00:00:00 2001 From: siddhant2001 Date: Fri, 19 Jul 2024 15:44:25 +0530 Subject: [PATCH] Add email in config_change_event_value.proto --- .../config/change/event/v1/config_change_event_value.proto | 1 + .../change/event/impl/ConfigChangeEventGeneratorImpl.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config-service-change-event-api/src/main/proto/org/hypertrace/config/change/event/v1/config_change_event_value.proto b/config-service-change-event-api/src/main/proto/org/hypertrace/config/change/event/v1/config_change_event_value.proto index 92cc6b6b..45404fe8 100644 --- a/config-service-change-event-api/src/main/proto/org/hypertrace/config/change/event/v1/config_change_event_value.proto +++ b/config-service-change-event-api/src/main/proto/org/hypertrace/config/change/event/v1/config_change_event_value.proto @@ -14,6 +14,7 @@ message ConfigChangeEventValue { } optional string user_id = 4; optional string user_name = 5; + optional string user_email = 7; int64 event_time_millis = 6; } diff --git a/config-service-change-event-generator/src/main/java/org/hypertrace/config/service/change/event/impl/ConfigChangeEventGeneratorImpl.java b/config-service-change-event-generator/src/main/java/org/hypertrace/config/service/change/event/impl/ConfigChangeEventGeneratorImpl.java index ff1d10fa..86aabdd7 100644 --- a/config-service-change-event-generator/src/main/java/org/hypertrace/config/service/change/event/impl/ConfigChangeEventGeneratorImpl.java +++ b/config-service-change-event-generator/src/main/java/org/hypertrace/config/service/change/event/impl/ConfigChangeEventGeneratorImpl.java @@ -178,6 +178,7 @@ private void produceDeleteNotification( private void populateUserDetails(RequestContext requestContext, Builder builder) { requestContext.getUserId().ifPresent(builder::setUserId); - requestContext.getName().or(requestContext::getEmail).ifPresent(builder::setUserName); + requestContext.getName().ifPresent(builder::setUserName); + requestContext.getEmail().ifPresent(builder::setUserEmail); } }