Commit ad8da22
fix(logs,metrics): Attach user attributes to logs and metrics regardless of sendDefaultPii (#5099)
* fix: Attach user attributes to logs and metrics regardless of sendDefaultPii
When a user is explicitly set on the scope, user.id, user.name, and
user.email are now always attached to log and metric attributes, matching
the existing behavior for error events (SentryClient.applyScope).
Fixes #5078
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* changelog: Add entry for user attributes fix in logs/metrics
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent a08aa02 commit ad8da22
File tree
4 files changed
+29
-26
lines changed- sentry/src
- main/java/io/sentry
- logger
- metrics
- test/java/io/sentry
4 files changed
+29
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
| 246 | + | |
249 | 247 | | |
250 | 248 | | |
251 | 249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 233 | + | |
236 | 234 | | |
237 | 235 | | |
238 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2953 | 2953 | | |
2954 | 2954 | | |
2955 | 2955 | | |
2956 | | - | |
| 2956 | + | |
2957 | 2957 | | |
2958 | 2958 | | |
2959 | 2959 | | |
| |||
2975 | 2975 | | |
2976 | 2976 | | |
2977 | 2977 | | |
2978 | | - | |
2979 | | - | |
2980 | | - | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
| 2988 | + | |
2981 | 2989 | | |
2982 | 2990 | | |
2983 | 2991 | | |
| |||
2988 | 2996 | | |
2989 | 2997 | | |
2990 | 2998 | | |
2991 | | - | |
2992 | 2999 | | |
2993 | 3000 | | |
2994 | 3001 | | |
| |||
3012 | 3019 | | |
3013 | 3020 | | |
3014 | 3021 | | |
3015 | | - | |
3016 | 3022 | | |
3017 | 3023 | | |
3018 | 3024 | | |
| |||
3919 | 3925 | | |
3920 | 3926 | | |
3921 | 3927 | | |
3922 | | - | |
| 3928 | + | |
3923 | 3929 | | |
3924 | 3930 | | |
3925 | 3931 | | |
| |||
3937 | 3943 | | |
3938 | 3944 | | |
3939 | 3945 | | |
3940 | | - | |
3941 | | - | |
3942 | | - | |
| 3946 | + | |
| 3947 | + | |
| 3948 | + | |
| 3949 | + | |
| 3950 | + | |
| 3951 | + | |
| 3952 | + | |
| 3953 | + | |
| 3954 | + | |
| 3955 | + | |
| 3956 | + | |
3943 | 3957 | | |
3944 | 3958 | | |
3945 | 3959 | | |
| |||
3948 | 3962 | | |
3949 | 3963 | | |
3950 | 3964 | | |
3951 | | - | |
3952 | | - | |
3953 | | - | |
3954 | | - | |
3955 | | - | |
| 3965 | + | |
3956 | 3966 | | |
3957 | 3967 | | |
3958 | 3968 | | |
| |||
3972 | 3982 | | |
3973 | 3983 | | |
3974 | 3984 | | |
3975 | | - | |
3976 | | - | |
3977 | | - | |
3978 | | - | |
3979 | | - | |
| 3985 | + | |
3980 | 3986 | | |
3981 | 3987 | | |
3982 | 3988 | | |
| |||
0 commit comments