-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Scheduled observation convention for lambdas
Prior to this commit, the `DefaultScheduledTaskObservationConvention` would fail as it tried to add a `KeyValue` to the observation context that is `null`. This is rejected by the observation registry and should be prevented. This happened when registered scheduled methods were lambdas or part of anonymous classes. Those types do not have a canonical name and return `null` as a value there. This commit ensures that for these cases, the default convetion uses a `"ANONYMOUS"` value as the `"code.namespace"` keyvalue. Fixes gh-31918
- Loading branch information
Showing
3 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters