diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RollbarConfig.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RollbarConfig.java index 39322b7598..e6b0ca16e0 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RollbarConfig.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/RollbarConfig.java @@ -1,9 +1,11 @@ package com.appsmith.server.configurations; import com.rollbar.notifier.Rollbar; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; import static com.rollbar.notifier.config.ConfigBuilder.withAccessToken; @@ -13,8 +15,13 @@ public class RollbarConfig { @Value("${com.rollbar.access-token}") String rollbarAccessToken; + @Autowired + Environment env; + @Bean Rollbar rollbarConfiguration() { - return Rollbar.init(withAccessToken(rollbarAccessToken).build()); + return Rollbar.init(withAccessToken(rollbarAccessToken) + .environment(env.getActiveProfiles()[0]) + .build()); } } diff --git a/app/server/appsmith-server/src/main/resources/application-docker.properties b/app/server/appsmith-server/src/main/resources/application-docker.properties index de929b1b0f..9bd5ca7faa 100644 --- a/app/server/appsmith-server/src/main/resources/application-docker.properties +++ b/app/server/appsmith-server/src/main/resources/application-docker.properties @@ -31,7 +31,6 @@ oauth2.allowed-domains= # These properties are intentionally set to random values so that events are not sent to either of them during local development segment.writeKey=random-value com.rollbar.access-token=random-value -com.rollbar.environment=development # Redis Properties spring.redis.host=redis diff --git a/app/server/appsmith-server/src/main/resources/application-local.properties b/app/server/appsmith-server/src/main/resources/application-local.properties index e7f2142013..ca2e78e460 100644 --- a/app/server/appsmith-server/src/main/resources/application-local.properties +++ b/app/server/appsmith-server/src/main/resources/application-local.properties @@ -31,7 +31,6 @@ spring.security.oauth2.client.provider.github.userNameAttribute=login # These properties are intentionally set to random values so that events are not sent to either of them during local development segment.writeKey=random-value com.rollbar.access-token=random-value -com.rollbar.environment=development # Redis Properties spring.redis.host=127.0.0.1 diff --git a/app/server/appsmith-server/src/main/resources/application-staging.properties b/app/server/appsmith-server/src/main/resources/application-staging.properties index b2b1d0fbbf..a172fa5322 100644 --- a/app/server/appsmith-server/src/main/resources/application-staging.properties +++ b/app/server/appsmith-server/src/main/resources/application-staging.properties @@ -28,11 +28,10 @@ oauth2.allowed-domains= # Segment & Rollbar Properties segment.writeKey=B3UBOacfOky4l6dfk5xyR6Dh8vUZYizW com.rollbar.access-token=b91c4d5b9cac444088f4db9216ed6f42 -com.rollbar.environment=development # Redis Properties -spring.redis.host=ec2-52-19-170-171.eu-west-1.compute.amazonaws.com -spring.redis.port=10639 +spring.redis.host=ec2-34-254-16-19.eu-west-1.compute.amazonaws.com +spring.redis.port=18689 spring.redis.user=h spring.redis.password=p46c3e6d77c32e6f1026f16ae781911d8a2631ece413406a75fc31b0cfb9edb03