Skip to content

Add more context to the error message #287

@Loki-Afro

Description

@Loki-Afro

Describe the change

Add more context to the error message, making it easier to identify the source of the problem

Current situation

Currently, when a value is not found in the result set of a MongoDB aggregation, a generic error message value not found in result set is logged. This makes it difficult to debug and identify which metric or query is causing the issue, especially when there are many aggregations configured.

Should

The error message should be more descriptive and provide context about the metric that failed. The new error message will be value for metric <metric.Name> with key <metric.Value> not found in result set, which clearly identifies the metric and the key that was not found.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions