get_dataset_message_metrics
Analyze message volume trends for Kafka datasets to monitor data flow and identify patterns across specified time ranges.
Instructions
Get ranged metrics for a dataset's messages.
Args: environment: The environment name. entity_name: The dataset's entity name.
Returns: List of message metrics with date and message count.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | Yes | ||
| entity_name | Yes |
Implementation Reference
- src/lenses_mcp/tools/topics.py:400-413 (handler)The handler function for the 'get_dataset_message_metrics' tool, decorated with @mcp.tool() for registration. It retrieves message metrics for a specified Kafka dataset by making an API GET request to the appropriate endpoint.@mcp.tool() async def get_dataset_message_metrics(environment: str, entity_name: str) -> List[Dict[str, Any]]: """ Get ranged metrics for a dataset's messages. Args: environment: The environment name. entity_name: The dataset's entity name. Returns: List of message metrics with date and message count. """ endpoint = f"/api/v1/environments/{environment}/proxy/api/v1/datasets/kafka/{entity_name}/messages/metrics" return await api_client._make_request("GET", endpoint)