-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Overview
The telemetry module (src/mcpcat/modules/telemetry.py
) and related exporter modules lack complete type hints. Adding proper type annotations would improve code maintainability, IDE support, and help prevent type-related bugs.
Current State
Several functions and methods in the telemetry system are missing type hints or have incomplete annotations. This makes it harder for developers to understand the expected types and for tools to provide accurate autocomplete and type checking.
Requirements
Add complete type hints to:
- TelemetryManager class - All methods and attributes
- Exporter base class - Interface definition
- Concrete exporters - OTLP, Datadog, Sentry implementations
- Helper functions - Any utility functions in the module
Why This Matters
- Improves IDE autocomplete and suggestions
- Catches type-related bugs during development
- Makes the codebase more maintainable
- Helps new contributors understand the code faster
- Enables better static analysis with tools like mypy
Acceptance Criteria
- All public methods have complete type hints
- All function parameters have type annotations
- All return types are specified
- Complex types use appropriate typing imports (Dict, List, Optional, etc.)
- Type hints pass mypy checks without errors
- No runtime behavior changes
Getting Started
- Review Python typing best practices
- Look at existing type hints in other modules for consistency
- Start with the TelemetryManager class
- Use typing module imports as needed
- Test with mypy to ensure correctness
Notes
- Use Optional[T] for nullable types
- Consider using TypedDict for complex dictionary structures
- Keep type hints readable and not overly complex
- This is a great way to learn the telemetry system architecture
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed