{"id":28242,"library":"spotlight-monitor","title":"Spotlight Monitor","description":"Spotlight Monitor is an AI-powered service monitoring SDK for Python. Version 0.5.1 supports Python >=3.9. It provides decorators and context managers to track service health, latency, and errors, integrating with OpenAI and Anthropic for intelligent alerting. Release cadence is irregular.","status":"active","version":"0.5.1","language":"python","source_language":"en","source_url":"https://github.com/spotlight-dev/spotlight-monitor","tags":["monitoring","ai","observability","sdk","decorator"],"install":[{"cmd":"pip install spotlight-monitor","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for AI-powered alerting (e.g., OpenAI integration)","package":"openai","optional":true},{"reason":"Optional for Anthropic integration","package":"anthropic","optional":true}],"imports":[{"note":"monitor is a decorator/context manager, not a module","wrong":"from spotlight_monitor.monitor import monitor","symbol":"monitor","correct":"from spotlight_monitor import monitor"},{"note":"HealthCheck is exposed at package level","wrong":"from spotlight_monitor.health import HealthCheck","symbol":"HealthCheck","correct":"from spotlight_monitor import HealthCheck"},{"note":"Client is available as top-level export","wrong":"from spotlight_monitor.client import SpotlightClient","symbol":"SpotlightClient","correct":"from spotlight_monitor import SpotlightClient"}],"quickstart":{"code":"import os\nfrom spotlight_monitor import monitor\n\n@monitor(service=\"my_service\", api_key=os.environ.get('SPOTLIGHT_API_KEY', ''))\ndef my_function():\n    return \"Hello, world!\"\n\nprint(my_function())","lang":"python","description":"Decorate any function to automatically monitor its execution. Set SPOTLIGHT_API_KEY environment variable."},"warnings":[{"fix":"Change all imports to 'spotlight_monitor' instead of 'spotlight'.","message":"Version 0.5.0 changed the default export name from 'spotlight' to 'spotlight_monitor'. Imports using 'import spotlight' will break. Use 'import spotlight_monitor' or 'from spotlight_monitor import ...'.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Replace 'alert_provider=\"openai\"' with 'integrations=[\"openai\"]'.","message":"The keyword argument 'alert_provider' is deprecated as of 0.5.0. Use 'integrations' instead.","severity":"deprecated","affected_versions":">=0.5.0"},{"fix":"Always set SPOTLIGHT_API_KEY or pass api_key explicitly to enable AI features.","message":"If you omit the api_key parameter, the monitor will attempt to read SPOTLIGHT_API_KEY from environment variables. If not set, it will silently fall back to a local-only mode without AI features. This can be confusing when you expect AI alerts.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Uninstall old package: 'pip uninstall spotlight' and install new: 'pip install spotlight-monitor', then use 'import spotlight_monitor'.","cause":"In version 0.5.0, the package name on PyPI changed from 'spotlight' to 'spotlight-monitor', and the import name changed to 'spotlight_monitor'.","error":"ModuleNotFoundError: No module named 'spotlight'"},{"fix":"Replace 'alert_provider=\"openai\"' with 'integrations=[\"openai\"]'.","cause":"The 'alert_provider' parameter was deprecated and removed in version 0.5.0. Use 'integrations' instead.","error":"TypeError: monitor() got an unexpected keyword argument 'alert_provider'"},{"fix":"Use 'SpotlightClient' instead of 'Client'. Alternatively, check the version and update imports accordingly.","cause":"In older versions (<0.4.0), the client was named 'Client'. It was renamed to 'SpotlightClient' in 0.4.0.","error":"AttributeError: module 'spotlight_monitor' has no attribute 'SpotlightClient'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}