fix(plugins): report metrics for all plugin types, not only MetadataAgents (#4303)

- Add ErrNotImplemented error to plugins/api package with proper documentation
- Refactor callMethod in wasm_base_plugin to use api.ErrNotImplemented
- Improve metrics recording logic to exclude not-implemented methods
- Add better tracing and context handling for plugin calls
- Reorganize error definitions with clear documentation
This commit is contained in:
Deluan Quintão
2025-07-02 22:05:28 -04:00
committed by GitHub
parent d4f869152b
commit 9b3d3d15a1
2 changed files with 18 additions and 15 deletions
+5 -1
View File
@@ -3,6 +3,10 @@ package api
import "errors"
var (
ErrNotFound = errors.New("plugin:not_found")
// ErrNotImplemented indicates that the plugin does not implement the requested method.
// No logic should be executed by the plugin.
ErrNotImplemented = errors.New("plugin:not_implemented")
// ErrNotFound indicates that the requested resource was not found by the plugin.
ErrNotFound = errors.New("plugin:not_found")
)