Closed freak12techno closed 4 months ago
The latest update introduces a new feature for fetching and generating consumer information within the application. New components, including ConsumerInfoFetcher
and ConsumerInfoGenerator
, were added to handle data retrieval and metric generation. Additionally, relevant structures and methods were expanded to support these functionalities, including modifications in the RPC
methods and the inclusion of consumer-related types in the codebase.
File(s) | Summary |
---|---|
pkg/app.go |
Added ConsumerInfoFetcher and ConsumerInfoGenerator to the list of fetchers and generators. |
pkg/config/chain.go |
Added the IsProvider field to the Chain struct. |
pkg/constants/constants.go |
Introduced the FetcherNameConsumerInfo constant. |
pkg/fetchers/consumer_info.go |
Added ConsumerInfoFetcher struct for fetching consumer info, methods for concurrent data fetch and processing. |
pkg/generators/consumer_info.go |
Created ConsumerInfoGenerator struct for generating Prometheus metrics related to consumer info. |
pkg/tendermint/rpc.go |
Introduced GetConsumerInfo method in RPC for fetching consumer information. |
pkg/types/tendermint.go |
Added ConsumerChainInfo and ConsumerInfoResponse types for handling consumer information data. |
sequenceDiagram
participant Logger
participant Config
participant RPC
participant Tracer
participant ConsumerInfoFetcher
participant ConsumerInfoGenerator
participant State
participant Prometheus
Note over Logger, ConsumerInfoFetcher: Initialization and Setup
Logger->>ConsumerInfoFetcher: Initialize with Logger, Config, RPC, Tracer
Note over ConsumerInfoFetcher: Fetching Consumer Information
ConsumerInfoFetcher->>+RPC: GetConsumerInfo(ctx)
RPC-->>-ConsumerInfoFetcher: Return ConsumerInfoData
Note over ConsumerInfoGenerator: Generating Metrics
ConsumerInfoFetcher->>ConsumerInfoGenerator: Pass ConsumerInfoData
ConsumerInfoGenerator->>+State: Generate metrics
State-->>+Prometheus: Expose metrics
In the land of code, changes flow, New fetchers, generators aglow.
Metrics dance in Prometheus light,
Chains and consumers take their flight.
With RPC's gentle hand,
Data streams across this land.
Celebrate with bytes and cheer 🎉, For new features are finally here!
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Enhancements
IsProvider
to better manage provider status.