feat: extract HTTP and Observability engine plugins (#82)#127
Merged
Conversation
Move HTTP and Observability module types from core engine into dedicated plugin packages: - plugins/http: http.server, http.router, http.handler, middlewares, proxies, static fileserver, HTTP steps and triggers - plugins/observability: metrics.collector, health.checker, log.collector, observability.otel, openapi.generator Remove duplicate observability wiring hooks from HTTP plugin — health, metrics, log, and OpenAPI endpoint registration now lives exclusively in the observability plugin to avoid double-registration. Both plugins registered in cmd/server/main.go. Module types removed from engine.go core registration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR completes Engine Decomposition Phase 2 by removing observability endpoint wiring from the HTTP plugin, leaving observability endpoint registration exclusively in the observability plugin.
Changes:
- Removed duplicated observability endpoint wiring hooks (health/metrics/log/OpenAPI) from
plugins/http. - Updated the HTTP plugin manifest and tests to reflect only the remaining HTTP-specific wiring hooks.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
plugins/http/wiring.go |
Removes observability endpoint wiring hooks/functions from the HTTP plugin wiring list. |
plugins/http/plugin.go |
Updates the HTTP plugin manifest to list only the remaining wiring hooks. |
plugins/http/plugin_test.go |
Adjusts wiring hook expectations in tests after the hook removal. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes Engine Decomposition Phase 2 (issue #82) by cleaning up the separation of HTTP and Observability concerns into their dedicated plugin packages.
Changes
plugins/http/ — Remove 4 duplicate observability wiring hooks that were duplicated in both the HTTP and observability plugins:
http-health-endpoint-registrationhttp-metrics-endpoint-registrationhttp-log-endpoint-registrationhttp-openapi-endpoint-registrationThe HTTP plugin now owns only HTTP-specific wiring:
http-auth-provider-wiring— connects AuthProviders to AuthMiddlewarehttp-static-fileserver-registration— registers static file servers on routersplugins/observability/ — Already correctly owns all observability endpoint wiring (health, metrics, log, OpenAPI). No changes needed.
Plugin Architecture
Both plugins implement
EnginePluginand are registered incmd/server/main.go:Verification
go build -o server ./cmd/server✅go test ./... -timeout 180s✅ (all 80+ packages pass)go vet ./...✅golangci-lint run✅Closes #82