Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/prometheus endpoint #369

Open
wants to merge 53 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
383737f
feat: prometheus endpoint
annasambrook Dec 13, 2024
c97ef40
fix: metric labels
annasambrook Dec 13, 2024
547a4ba
Merge remote-tracking branch 'origin/develop' into feat/prometheus-en…
annasambrook Dec 13, 2024
b30afc8
chore: generators
annasambrook Dec 13, 2024
829bdd4
chore: generators
annasambrook Dec 16, 2024
d1c9603
Merge branch 'refs/heads/develop' into feat/prometheus-endpoint
annasambrook Dec 16, 2024
aa31df2
chore: generators
annasambrook Dec 16, 2024
a4fdacd
refactor: move wallet balance to market manager
annasambrook Dec 17, 2024
47caf37
enhance: add staking contract slots to metrics endpoint
annasambrook Dec 18, 2024
9fdab40
fix: changes after code checks
annasambrook Dec 19, 2024
662e48f
chore: generators
annasambrook Dec 19, 2024
9fec4ef
fix: add missing dependency to the skill
Adamantios Dec 19, 2024
79bb146
chore: run tox -e check-dependencies
Adamantios Dec 19, 2024
20962c8
chore: ignore missing prometheus client imports
Adamantios Dec 19, 2024
48874d5
chore: run generators
Adamantios Dec 19, 2024
0902d35
fix: registry duplicated timeseries error
annasambrook Dec 19, 2024
1565bb4
Merge remote-tracking branch 'origin/feat/prometheus-endpoint' into f…
annasambrook Dec 19, 2024
abba52b
chore: generators
annasambrook Dec 19, 2024
1e9d3a0
Update packages/valory/skills/decision_maker_abci/skill.yaml
annasambrook Dec 19, 2024
4476197
Update packages/valory/skills/market_manager_abci/skill.yaml
annasambrook Dec 19, 2024
cce8e0f
chore: autonomy packages lock
annasambrook Dec 19, 2024
ae56e81
fix: tests
annasambrook Dec 19, 2024
572ce4b
fix: test decision request payload
annasambrook Dec 19, 2024
eddd0fa
chore: generators
annasambrook Dec 19, 2024
7132eb2
fix: check stop trading payload test
annasambrook Dec 19, 2024
c37cdd2
fix: tests
annasambrook Dec 19, 2024
8edd3af
fix: keywords must be strings
annasambrook Dec 20, 2024
b565ad6
fix: yield balance check
annasambrook Dec 23, 2024
d6f1cbc
chore: generators
annasambrook Dec 23, 2024
0c54647
fix: olas balance contract call
annasambrook Dec 23, 2024
061e153
add: service owner address
annasambrook Dec 23, 2024
c979c0d
Merge branch 'refs/heads/develop' into feat/prometheus-endpoint
annasambrook Dec 23, 2024
84dbcf7
fix: servie owner address duplication
annasambrook Dec 23, 2024
518f4ec
refactor: make olas token address param
annasambrook Dec 27, 2024
204764e
fix: gitleaksignore
annasambrook Dec 27, 2024
4c6c7a1
fix: trader skill
annasambrook Dec 27, 2024
062ee0d
Merge branch 'refs/heads/develop' into feat/prometheus-endpoint
annasambrook Jan 22, 2025
7eef10b
chore: generators
annasambrook Jan 22, 2025
a47cd6f
Merge branch 'refs/heads/main' into feat/prometheus-endpoint
annasambrook Jan 24, 2025
4fad8e8
add: label for staking contract name
annasambrook Jan 24, 2025
f6ef048
add: env var for http handler
annasambrook Jan 28, 2025
8d0dd6c
fix: prometheus registry duplication
annasambrook Jan 28, 2025
33237fe
add: epoch countdown
annasambrook Jan 29, 2025
fb22731
chore: formatters
annasambrook Jan 29, 2025
f92b35e
chore: copyright
annasambrook Jan 29, 2025
feeab0f
fix: label names and None values
annasambrook Jan 29, 2025
b7f3e3a
chore: generators and common checks
annasambrook Jan 29, 2025
a4f47e4
Merge branch 'refs/heads/develop' into feat/prometheus-endpoint
annasambrook Jan 30, 2025
880b960
chore: generators
annasambrook Jan 30, 2025
d387551
add: exclude erc20 from generators and common checks
annasambrook Jan 30, 2025
ea4d3a4
chore: generators
annasambrook Jan 30, 2025
66659bc
fix: prometheus collector registry refresh on startup
annasambrook Jan 31, 2025
07a9de2
chore: format and generators
annasambrook Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: keywords must be strings
  • Loading branch information
annasambrook committed Dec 20, 2024
commit 8edd3af76935e14d7992305ca2030e784c51b0d7
14 changes: 7 additions & 7 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"contract/valory/mech_activity/0.1.0": "bafybeibmqmle5fnal3gxlpdmcos2kogzra4q3pr3o5nh7shplxuilji3t4",
"contract/valory/staking_token/0.1.0": "bafybeiep4r6qyilbfgzdvx6t7zvpgaioxqktmxm7puwtnbpb2ftlib43gy",
"contract/valory/relayer/0.1.0": "bafybeicawmds6czx7db2lcktvexwrp245jpekgulndtos5s5zdid3ilvq4",
"skill/valory/market_manager_abci/0.1.0": "bafybeih2qtjac3clerbksdolhwmild2qraq52wyqy4e4sfrjr5cwsq7jce",
"skill/valory/decision_maker_abci/0.1.0": "bafybeihyah4wq5bcnoe6zwdj7vvfka5lzvccoly533uhisd6hdtiqmckuy",
"skill/valory/trader_abci/0.1.0": "bafybeifsh6vlual5aikj2wxmjlzpfqz7rnegdihs6yopg7wbqecnamqrpm",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiaiiyipkq57rcrsxlvaoytsher37rw3dplda6mpcw67wx5276wbgm",
"skill/valory/market_manager_abci/0.1.0": "bafybeicyfwbse4smcqutejtxkucxmgz3zwd2xbu5ssey2idz6qrgdeyxme",
"skill/valory/decision_maker_abci/0.1.0": "bafybeigte5gwpotorfip225z335ilhgkztgbmpac7yhdovwgk3ihyg2lai",
"skill/valory/trader_abci/0.1.0": "bafybeicx7i6733c3qlxubrqfykrbkh7f557ewe6yj7ze2mk3vvlof7mftu",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeif5vmgdasgt6rxe6caq3nxghpvd6tmk6bvus4lunddvuso6m7q53y",
"skill/valory/staking_abci/0.1.0": "bafybeihwaf4gimmzhytwyzujxpg4gt4iq3wpoz5zyduxhbxo2uezm2scg4",
"skill/valory/check_stop_trading_abci/0.1.0": "bafybeigx27kht65vungmp4ldck7vgjsg4zr62fyvspzoxjsg66g6pkglla",
"agent/valory/trader/0.1.0": "bafybeiefd2bglm4qgww7ftx7jvyhrwbqbemoghdvxmgzy7wrubsap363oi",
"service/valory/trader/0.1.0": "bafybeidvxl6myaxxspjpbvoace2lzsad2a5w3qoepyqzrvkvvte5wq7jqa",
"service/valory/trader_pearl/0.1.0": "bafybeih57im33ur6ua5zgfnpgvys2konmwpm5wmcjslccajjkwowvaat7m"
"agent/valory/trader/0.1.0": "bafybeicpbxsxvp4b4355wvo5x6hiocimzohkd5jk2thl6gneyxlwrf24o4",
"service/valory/trader/0.1.0": "bafybeidfppwgwvkiejudx5kwgxzfgov7lnrw7qgbtm5k6owwg7thzyz6ca",
"service/valory/trader_pearl/0.1.0": "bafybeiaghlwavqqcptardvphgeull6htv4hrpygjug564iao5autmsrupu"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand Down
8 changes: 4 additions & 4 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba
- valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm
- valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaiiyipkq57rcrsxlvaoytsher37rw3dplda6mpcw67wx5276wbgm
- valory/market_manager_abci:0.1.0:bafybeih2qtjac3clerbksdolhwmild2qraq52wyqy4e4sfrjr5cwsq7jce
- valory/decision_maker_abci:0.1.0:bafybeihyah4wq5bcnoe6zwdj7vvfka5lzvccoly533uhisd6hdtiqmckuy
- valory/trader_abci:0.1.0:bafybeifsh6vlual5aikj2wxmjlzpfqz7rnegdihs6yopg7wbqecnamqrpm
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif5vmgdasgt6rxe6caq3nxghpvd6tmk6bvus4lunddvuso6m7q53y
- valory/market_manager_abci:0.1.0:bafybeicyfwbse4smcqutejtxkucxmgz3zwd2xbu5ssey2idz6qrgdeyxme
- valory/decision_maker_abci:0.1.0:bafybeigte5gwpotorfip225z335ilhgkztgbmpac7yhdovwgk3ihyg2lai
- valory/trader_abci:0.1.0:bafybeicx7i6733c3qlxubrqfykrbkh7f557ewe6yj7ze2mk3vvlof7mftu
- valory/staking_abci:0.1.0:bafybeihwaf4gimmzhytwyzujxpg4gt4iq3wpoz5zyduxhbxo2uezm2scg4
- valory/check_stop_trading_abci:0.1.0:bafybeigx27kht65vungmp4ldck7vgjsg4zr62fyvspzoxjsg66g6pkglla
- valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeiefd2bglm4qgww7ftx7jvyhrwbqbemoghdvxmgzy7wrubsap363oi
agent: valory/trader:0.1.0:bafybeicpbxsxvp4b4355wvo5x6hiocimzohkd5jk2thl6gneyxlwrf24o4
number_of_agents: 4
deployment:
agent:
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/trader_pearl/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeibg7bdqpioh4lmvknw3ygnllfku32oca4eq5pqtvdrdsgw6buko7e
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeiefd2bglm4qgww7ftx7jvyhrwbqbemoghdvxmgzy7wrubsap363oi
agent: valory/trader:0.1.0:bafybeicpbxsxvp4b4355wvo5x6hiocimzohkd5jk2thl6gneyxlwrf24o4
number_of_agents: 1
deployment:
agent:
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/decision_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ protocols:
- valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae
skills:
- valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u
- valory/market_manager_abci:0.1.0:bafybeih2qtjac3clerbksdolhwmild2qraq52wyqy4e4sfrjr5cwsq7jce
- valory/market_manager_abci:0.1.0:bafybeicyfwbse4smcqutejtxkucxmgz3zwd2xbu5ssey2idz6qrgdeyxme
- valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae
- valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm
- valory/staking_abci:0.1.0:bafybeihwaf4gimmzhytwyzujxpg4gt4iq3wpoz5zyduxhbxo2uezm2scg4
Expand Down
2 changes: 0 additions & 2 deletions packages/valory/skills/market_manager_abci/behaviours.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,6 @@ def async_act(self) -> Generator:
wallet_balance = self.wallet_balance
token_balance = self.token_balance

print(f"WALLET BALANCE: {wallet_balance}")

bets_hash = self.hash_stored_bets() if self.bets else None
payload = UpdateBetsPayload(
self.context.agent_address, bets_hash, wallet_balance, token_balance
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/skills/market_manager_abci/rounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class BaseUpdateBetsRound(CollectSameUntilThresholdRound, MarketManagerAbstractR
done_event: Enum = Event.DONE
none_event: Enum = Event.FETCH_ERROR
no_majority_event: Enum = Event.NO_MAJORITY
selection_key = (get_name(SynchronizedData.bets_hash),)
selection_key = get_name(SynchronizedData.bets_hash)
collection_key = get_name(SynchronizedData.participant_to_bets_hash)
synchronized_data_class = SynchronizedData

Expand Down
6 changes: 3 additions & 3 deletions packages/valory/skills/market_manager_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0'
fingerprint:
README.md: bafybeie6miwn67uin3bphukmf7qgiifh4xtm42i5v3nuyqxzxtehxsqvcq
__init__.py: bafybeigrtedqzlq5mtql2ssjsdriw76ml3666m4e2c3fay6vmyzofl6v6e
behaviours.py: bafybeig5akdvjjl2jviph5x76jvdeydk6ykasfkv5em3x7xflm6w3ylmwm
behaviours.py: bafybeifydfnmic6vkeu52cwuw2qtr3lwomvo3m6f42yh6fqne3srxhhtoi
bets.py: bafybeibx3x5nasuj6loneeat2lb7fr7kgsmnz7on7f4gxfbpzerzdvawou
dialogues.py: bafybeiebofyykseqp3fmif36cqmmyf3k7d2zbocpl6t6wnlpv4szghrxbm
fsm_specification.yaml: bafybeic5cvwfbiu5pywyp3h5s2elvu7jqdrcwayay7o3v3ow47vu2jw53q
Expand All @@ -24,12 +24,12 @@ fingerprint:
handlers.py: bafybeihot2i2yvfkz2gcowvt66wdu6tkjbmv7hsmc4jzt4reqeaiuphbtu
models.py: bafybeibjttnga54y4auz6f33ecfrngyw53b2xzpompm72drjsr4xoytmiy
payloads.py: bafybeigaoni6raoz4ebdghe5jhvmjkuldkocwg2qbxj2cr62454ed2voae
rounds.py: bafybeigzbssdfjwtia7xa2okip4yx33ilyqnhdrilittrm3ezb7jac2q5a
rounds.py: bafybeic655jrb3oc3sr4fufc2n6psxhvbw4pw24qpbblzhbmbinwl242aq
tests/__init__.py: bafybeigaewntxawezvygss345kytjijo56bfwddjtfm6egzxfajsgojam4
tests/test_dialogues.py: bafybeiet646su5nsjmvruahuwg6un4uvwzyj2lnn2jvkye6cxooz22f3ja
tests/test_handlers.py: bafybeiaz3idwevvlplcyieaqo5oeikuthlte6e2gi4ajw452ylvimwgiki
tests/test_payloads.py: bafybeia3qstr7ieu2nenznqtmuvipmnequkcp5vwefl7buinckwttx674m
tests/test_rounds.py: bafybeihowwdqree7mtbxmfrl5hjido4d5qqgbwidsciir5kjbbz5gldroe
tests/test_rounds.py: bafybeiejxlbcmzb654bmjkbe2bamm25qo6imvnf2jt4fi4fq26j2s4q4ju
fingerprint_ignore_patterns: []
connections: []
contracts:
Expand Down
20 changes: 11 additions & 9 deletions packages/valory/skills/market_manager_abci/tests/test_rounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,17 @@ def run_test(self, test_case: RoundTestCase) -> None:
synchronized_data=self.synchronized_data, context=mock.MagicMock()
)

self._test_round(
test_round=test_round,
round_payloads=test_case.payloads,
synchronized_data_update_fn=lambda sync_data, _: sync_data.update(
**test_case.final_data
),
synchronized_data_attr_checks=test_case.synchronized_data_attr_checks,
most_voted_payload=test_case.most_voted_payload,
exit_event=test_case.event,
self._complete_run(
self._test_round(
test_round=test_round,
round_payloads=test_case.payloads,
synchronized_data_update_fn=lambda sync_data, _: sync_data.update(
**test_case.final_data
),
synchronized_data_attr_checks=test_case.synchronized_data_attr_checks,
most_voted_payload=test_case.most_voted_payload,
exit_event=test_case.event,
)
)


Expand Down
6 changes: 3 additions & 3 deletions packages/valory/skills/trader_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeigrdlxed3xlsnxtjhnsbl3cojruihxcqx4jxhgivkd5i2fkjncgba
- valory/transaction_settlement_abci:0.1.0:bafybeic7q7recyka272udwcupblwbkc3jkodgp74fvcdxb7urametg5dae
- valory/termination_abci:0.1.0:bafybeib5l7jhew5ic6iq24dd23nidcoimzqkrk556gqywhoziatj33zvwm
- valory/market_manager_abci:0.1.0:bafybeih2qtjac3clerbksdolhwmild2qraq52wyqy4e4sfrjr5cwsq7jce
- valory/decision_maker_abci:0.1.0:bafybeihyah4wq5bcnoe6zwdj7vvfka5lzvccoly533uhisd6hdtiqmckuy
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiaiiyipkq57rcrsxlvaoytsher37rw3dplda6mpcw67wx5276wbgm
- valory/market_manager_abci:0.1.0:bafybeicyfwbse4smcqutejtxkucxmgz3zwd2xbu5ssey2idz6qrgdeyxme
- valory/decision_maker_abci:0.1.0:bafybeigte5gwpotorfip225z335ilhgkztgbmpac7yhdovwgk3ihyg2lai
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeif5vmgdasgt6rxe6caq3nxghpvd6tmk6bvus4lunddvuso6m7q53y
- valory/staking_abci:0.1.0:bafybeihwaf4gimmzhytwyzujxpg4gt4iq3wpoz5zyduxhbxo2uezm2scg4
- valory/check_stop_trading_abci:0.1.0:bafybeigx27kht65vungmp4ldck7vgjsg4zr62fyvspzoxjsg66g6pkglla
- valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protocols:
- valory/ledger_api:1.0.0:bafybeihdk6psr4guxmbcrc26jr2cbgzpd5aljkqvpwo64bvaz7tdti2oni
skills:
- valory/abstract_round_abci:0.1.0:bafybeib733xfbndtpvkf44mtk7oyodnficgloo6xhn7xmqxxeos33es65u
- valory/decision_maker_abci:0.1.0:bafybeihyah4wq5bcnoe6zwdj7vvfka5lzvccoly533uhisd6hdtiqmckuy
- valory/decision_maker_abci:0.1.0:bafybeigte5gwpotorfip225z335ilhgkztgbmpac7yhdovwgk3ihyg2lai
- valory/staking_abci:0.1.0:bafybeihwaf4gimmzhytwyzujxpg4gt4iq3wpoz5zyduxhbxo2uezm2scg4
- valory/mech_interact_abci:0.1.0:bafybeid6m3i5ofq7vuogqapdnoshhq7mswmudhvfcr2craw25fdwtoe3lm
behaviours:
Expand Down
Loading