Repository navigation
Conversation
|
👋 Tofel, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
There was a problem hiding this comment.
Pull request overview
This PR enhances the observability framework to support flexible sourcing of observability configuration files. Instead of relying solely on embedded files, users can now load observability configurations from local filesystems or remote GitHub repositories, with automatic caching for remote sources.
Key Changes:
- Added support for multiple observability file sources (embedded, local filesystem, remote GitHub)
- Implemented GitHub API integration with caching mechanism for remote observability files
- Added new Chainlink client methods to read workflow debug and orphan events
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| framework/observability.go | Core implementation of flexible observability file sourcing with GitHub download/caching capabilities |
| framework/go.mod | Added GitHub API client dependencies (v72.0.0) |
| framework/clclient/models.go | Added data models for workflow debug and orphan events |
| framework/clclient/client.go | Added API methods to fetch workflow debug and orphan events |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Type string `json:"type"` | ||
| ID string `json:"id"` | ||
| Attributes WorkflowDebugEventsAttributes `json:"attributes"` |
There was a problem hiding this comment.
The field type should be WorkflowOrphanEventsAttributes instead of WorkflowDebugEventsAttributes. This is a copy-paste error that causes the WorkflowOrphanEventsData struct to have the wrong attributes type.
| Type string `json:"type"` | |
| ID string `json:"id"` | |
| Attributes WorkflowDebugEventsAttributes `json:"attributes"` | |
| Type string `json:"type"` | |
| ID string `json:"id"` | |
| Attributes WorkflowOrphanEventsAttributes `json:"attributes"` |
| "sequence": strconv.FormatInt(sequence, 10), | ||
| "limit": strconv.Itoa(limit), | ||
| }). | ||
| Get("/v2/debug/workflow/{id}/events?sequence={sequence}&limit={limit}") |
There was a problem hiding this comment.
Query parameters should not be included in the URL path when using SetQueryParams. The query string should be just '/v2/debug/workflow/{id}/events' as SetQueryParams already adds the query parameters.
| "sequence": strconv.FormatInt(sequence, 10), | ||
| "limit": strconv.Itoa(limit), | ||
| }). | ||
| Get("/v2/debug/workflow/orphan_events?sequence={sequence}&limit={limit}") |
There was a problem hiding this comment.
Query parameters should not be included in the URL path when using SetQueryParams. The query string should be just '/v2/debug/workflow/orphan_events' as SetQueryParams already adds the query parameters.
Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.
Why
The updates include the introduction of functionalities to read workflow and orphan events, models to support these functionalities, and improvements to the observability setup, including the ability to specify a source for observability files. These changes enhance the Chainlink client's capabilities and the flexibility of the observability setup, facilitating better debugging and monitoring.
What
strconvimport for string conversion.ReadWorkflowEventsandReadOrphanEventsmethods to fetch workflow-related debug events and orphan events, respectively. These methods facilitate better debugging by allowing retrieval of specific event logs.WorkflowDebugEvents,WorkflowOrphanEvents, and their related models to support the new client methods for fetching debug and orphan events.github.com/google/go-github/v72andgithub.com/google/go-querystring v1.1.0to support new functionalities related to GitHub integration.resolveObservabilitySource,downloadAndCacheObservabilityFiles,parseGitHubURL, anddownloadDirectoryRecursiveto handle observability files sourcing from different locations, including embedded, local, and GitHub sources.ObservabilityUpOnlyLokiWithSource,ObservabilityUpWithSource, andObservabilityUpFullWithSourcemethods that allow specifying an observability file source, enhancing flexibility in observability setup.ObservabilityUpOnlyLoki,ObservabilityUp, andObservabilityUpFullmethods to utilize the new source specification capabilities.