-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FunctionClauseError for Finch <0.12 (#798)
Finch 0.11 and below report `telemetry` events with the same name as those by Finch 0.12 and above, but the events carry different meanings and the metadata map provided has a different structure. Due to the different structure of the metadata map, our event handlers resulted in a `FunctionClauseError`, causing the handlers to detach. This commit changes the event handlers so that events not matching the expected structure are silently ignored. This means that we do not break applications using Finch 0.11 and below, but those Finch versions remain unsupported by our Finch integration.
- Loading branch information
Showing
3 changed files
with
93 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
.changesets/fix-functionclauseerror-for-old-finch-versions.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
bump: "patch" | ||
type: "fix" | ||
--- | ||
|
||
Fix FunctionClauseError for old Finch versions. This change explicitly ignores events from old Finch versions, meaning only Finch versions 0.12 and above will be instrumented, but using Finch versions 0.11 and below won't cause an event handler crash. |
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