Skip to content

Commit

Permalink
Missing metrics in Onramp (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara authored Mar 22, 2024
1 parent 05a0c86 commit cf201bd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions core/services/ocr2/plugins/ccip/internal/observability/onramp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccip"

"github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/internal/ccipdata"
)

Expand Down Expand Up @@ -42,3 +43,21 @@ func (o ObservedOnRampReader) GetDynamicConfig() (cciptypes.OnRampDynamicConfig,
return o.OnRampReader.GetDynamicConfig()
})
}

func (o ObservedOnRampReader) IsSourceCursed(ctx context.Context) (bool, error) {
return withObservedInteraction(o.metric, "IsSourceCursed", func() (bool, error) {
return o.OnRampReader.IsSourceCursed(ctx)
})
}

func (o ObservedOnRampReader) IsSourceChainHealthy(ctx context.Context) (bool, error) {
return withObservedInteraction(o.metric, "IsSourceChainHealthy", func() (bool, error) {
return o.OnRampReader.IsSourceChainHealthy(ctx)
})
}

func (o ObservedOnRampReader) SourcePriceRegistryAddress(ctx context.Context) (cciptypes.Address, error) {
return withObservedInteraction(o.metric, "SourcePriceRegistryAddress", func() (cciptypes.Address, error) {
return o.OnRampReader.SourcePriceRegistryAddress(ctx)
})
}

0 comments on commit cf201bd

Please sign in to comment.