hashgraph / hedera-sourcify

Tools for verifying Hedera smart contracts using standard open source libraries.
Apache License 2.0
6 stars 7 forks source link

Add metric support for services #40

Closed Nana-EC closed 7 months ago

Nana-EC commented 11 months ago

Problem

The open-source sourcify repo has in built grafana metrics support which we were not able to leverage in initial usgage

Solution

Explore and add capabilities to enable in built metrics to flow and be scraped by grafana services

Alternatives

No response

svienot commented 9 months ago

The sourcify environments folder contains set-up to launch various containers related to the monitoring of the systems:

I understand this set-up is neither complete, nor up-to-date and it looks like it no longer exists today in the upstream sourcify repository.

There are no application-specific metrics in the code today.

I got a reply on this subject a while ago from marco castignoli who is one of the sourcify.dev developers:

"_We are currently monitoring every metric using a separate grafana service that monitors our kubernetes pods, everything about grafana / nodeexporter / cadvisor you read in the repo is old. We also have an event manager class that logs different kind of events that can be used to track different sourcify specific metrics. These are the events that we monitor:

        "Verification.MatchStored"
        "Server.SourcifyChains.Warn"
        "SourceFetcher.UsingFallback"
        "SourceFetcher.NewSubscription"
        "SourceFetcher.Cleanup"
        "SourceFetcher.FetchFailed"
        "SourceFetcher.FetchingSuccessful"

Not many actually, we are thinking about removing this EventManager....
"

From this it looks like one of the events logged: "Verification.MatchStored"

 could be helpful to track the verified contract flow.