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

Add interactive job metrics #240

Merged
merged 3 commits into from
Feb 16, 2024
Merged

Conversation

noCharger
Copy link
Collaborator

@noCharger noCharger commented Feb 1, 2024

Description

Metrics included in this PR:

"s3.error.count";
"session.running.count";
"session.failed.count";
"session.success.count";
"session.processingTime";
"statement.running.count";
"statement.failed.count";
"statement.success.count";
"statement.processingTime";

There are two options to calculate session and statement metrics:
Option 1 (taken in this PR): Utilizes direct instrumentation, offering simplicity. However, it lacks resilience against manual modifications to request/result indices by users.
Option 2: Implements asynchronous data retrieval from the request index, ensuring data integrity from the primary source. This introduces additional overhead and dependency, given the external nature of the index.

Issues Resolved

#117

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@noCharger noCharger force-pushed the repl-metrics branch 4 times, most recently from 0ee42e7 to 89ca72c Compare February 2, 2024 19:56
@noCharger noCharger marked this pull request as ready for review February 2, 2024 19:56
@noCharger noCharger added the 0.1.1 label Feb 5, 2024
Signed-off-by: Louis Chu <[email protected]>
@noCharger noCharger changed the title Add repl metrics Add interactive job metrics Feb 13, 2024
@penghuo
Copy link
Collaborator

penghuo commented Feb 14, 2024

Description

Metrics included in this PR:

"s3.error.count";
"session.running.count";
"session.failed.count";
"session.success.count";
"session.processingTime";
"statement.running.count";
"statement.failed.count";
"statement.success.count";
"statement.processingTime";

There are two options to calculate session and statement metrics: Option 1 (taken in this PR): Utilizes direct instrumentation, offering simplicity. However, it lacks resilience against manual modifications to request/result indices by users. Option 2: Implements asynchronous data retrieval from the request index, ensuring data integrity from the primary source. This introduces additional overhead and dependency, given the external nature of the index.

Issues Resolved

#117

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

which option is preferred? option1 and option2?

@noCharger
Copy link
Collaborator Author

Description

Metrics included in this PR:

"s3.error.count";
"session.running.count";
"session.failed.count";
"session.success.count";
"session.processingTime";
"statement.running.count";
"statement.failed.count";
"statement.success.count";
"statement.processingTime";

There are two options to calculate session and statement metrics: Option 1 (taken in this PR): Utilizes direct instrumentation, offering simplicity. However, it lacks resilience against manual modifications to request/result indices by users. Option 2: Implements asynchronous data retrieval from the request index, ensuring data integrity from the primary source. This introduces additional overhead and dependency, given the external nature of the index.

Issues Resolved

#117
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

which option is preferred? option1 and option2?

option1 which taken in this PR

Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

what are the dimension of these metrics?

*
* @param metricName The name of the metric counter to be decremented.
*/
public static void decrementCounter(String metricName) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

by definition, A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart.

https://prometheus.io/docs/concepts/metric_types/#counter

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

by definition, A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart.

https://prometheus.io/docs/concepts/metric_types/#counter

Not sure about Prometheus, decrementing is possible with the Spark metrics library: https://metrics.dropwizard.io/4.2.0/manual/core.html#Counters

Signed-off-by: Louis Chu <[email protected]>
@noCharger noCharger requested a review from penghuo February 14, 2024 21:16
@penghuo penghuo merged commit 9c34a1d into opensearch-project:main Feb 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants