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 metrics observation #56

Merged
merged 10 commits into from
Jan 12, 2024
Merged

Add metrics observation #56

merged 10 commits into from
Jan 12, 2024

Conversation

flomillot
Copy link
Contributor

No description provided.

Signed-off-by: Florent MILLOT <[email protected]>
Signed-off-by: Florent MILLOT <[email protected]>
Signed-off-by: Florent MILLOT <[email protected]>
Signed-off-by: Florent MILLOT <[email protected]>
Signed-off-by: Florent MILLOT <[email protected]>
Signed-off-by: Florent MILLOT <[email protected]>
@klesaulnier klesaulnier self-requested a review January 11, 2024 08:13
Comment on lines 44 to 45
public <E extends Throwable> void observe(String name, SensitivityAnalysisRunContext runContext, Observation.CheckedRunnable<E> callable) throws E {
createObservation(name, runContext).observeChecked(callable);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public <E extends Throwable> void observe(String name, SensitivityAnalysisRunContext runContext, Observation.CheckedRunnable<E> callable) throws E {
createObservation(name, runContext).observeChecked(callable);
public <E extends Throwable> void observe(String name, SensitivityAnalysisRunContext runContext, Observation.CheckedRunnable<E> runnable) throws E {
createObservation(name, runContext).observeChecked(runnable);

Copy link
Contributor Author

@flomillot flomillot Jan 11, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Counter.builder(COMPUTATION_COUNTER_NAME)
.tag(PROVIDER_TAG_NAME, provider)
.tag(TYPE_TAG_NAME, COMPUTATION_TYPE)
.tag(STATUS_TAG_NAME, getStatusFromResult(result))
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean I should not use incrementCount as in security server ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed, I always return OK

Signed-off-by: Florent MILLOT <[email protected]>
Copy link

@flomillot flomillot merged commit 79893ef into main Jan 12, 2024
3 checks passed
@flomillot flomillot deleted the add-observations branch January 12, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants