Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Aiogram Based Metrics Collection for Prometheus
status
of bots and dispatchersnetwork activity
event handler performance
pip install aiogram-prometheus
storage
usage metricsupdates
import os
import aiogram
from aiogram import Bot, Dispatcher
from aiogram.fsm.storage.memory import MemoryStorage
from aiogram_prometheus import PrometheusUpdatesMiddleware, PrometheusWrapperStorage
bot = Bot(os.environ['ENV_TG_BOT'])
dp = Dispatcher(storage=PrometheusWrapperStorage(MemoryStorage()))
dp.update.middleware(PrometheusUpdatesMiddleware())
if __name__ == '__main__':
asyncio.run(dp.start_polling(bot))
A wrapper around any storage you use that will collect usage metrics
from aiogram import Bot, Dispatcher
from aiogram.fsm.storage.memory import MemoryStorage
from aiogram_prometheus import PrometheusWrapperStorage
dp = Dispatcher(storage=PrometheusWrapperStorage(MemoryStorage()))
Intermediate layer for collecting metrics of updates processing
from aiogram import Dispatcher
from aiogram_prometheus import PrometheusUpdatesMiddleware
dp = Dispatcher()
dp.update.middleware(PrometheusUpdatesMiddleware())
Issue Tracker: https://gitlab.com/rocshers/python/aiogram-prometheus/-/issues
Source Code: https://gitlab.com/rocshers/python/aiogram-prometheus
Before adding changes:
make install-dev
After changes:
make format test
FAQs
Aiogram Based Metrics Collection for Prometheus
We found that aiogram-prometheus demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.