Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CDAP-21119] Add metrics for error classification #15815

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

itsankit-google
Copy link
Member

@itsankit-google itsankit-google commented Jan 21, 2025

Jira : CDAP-21119

Description

This PR adds support for metrics for error classification for program run.

Added Unit Tests

Tested in CDAP Sandbox

image

Metrics.Tag.ERROR_CODE_TYPE, response.getErrorCodeType(),
Metrics.Tag.ERROR_CODE, response.getErrorCode()
));
context.increment(Metrics.Program.FAILED_RUNS_CLASSIFICATION_COUNT, 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should you use gauge? cache is in memory and pod restart / cache overflow would mean doublecounting. And gauge should work the way you want (with all the context) unless I miss something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the metric to gauge but I have still kept the cache so that we don't have to do re-processing of logs until cache is overflowed/ pod restart.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
62.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Triggers github actions build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants