-
-
Notifications
You must be signed in to change notification settings - Fork 465
Closed
Description
Problem Statement
Our Spring Boot integration could report active spring profiles by default.
This may help customers find issues with profiles not being applied or having the wrong profile active for any environment.
Solution Brainstorm
Adding this to our sample app:
@Bean
public SentryOptions.BeforeSendCallback beforeSendCallback(Environment environment) {
return (event, hint) -> {
event.setTag("active-spring-profiles", Arrays.toString(environment.getActiveProfiles()));
return event;
};
}
produces the following in an event with SPRING_PROFILES_ACTIVE=eu-staging:
"tags":
{
"my-partition-tag": "europe-tag",
"active-spring-profiles": "[eu-staging]"
},
and the following without any active profile:
"tags":
{
"active-spring-profiles": "[]"
},
We could replace the empty array with "default" instead.
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Done