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

Metrics #1032

Merged
merged 9 commits into from
Nov 15, 2024
Merged

Metrics #1032

merged 9 commits into from
Nov 15, 2024

Conversation

diptanu
Copy link
Collaborator

@diptanu diptanu commented Nov 15, 2024

Context

Metrics

What

Exposing HTTP and some service metrics via Prometheus endpoints
/metrics/http -returns http metrics and /metrics/service returns service metrics.

Testing

Ran the graph behavior tests and observed metrics

curl http://localhost:8900/metrics/http

curl http://localhost:8900/metrics/service

# HELP executors_online Number of executors online
# TYPE executors_online gauge
executors_online{otel_scope_name="state_machine_stats"} 1
# HELP target_info Target metadata
# TYPE target_info gauge
target_info{service_name="unknown_service",telemetry_sdk_language="rust",telemetry_sdk_name="opentelemetry",telemetry_sdk_version="0.24.1"} 1
# HELP tasks_completed_total Number of tasks completed
# TYPE tasks_completed_total counter
tasks_completed_total{otel_scope_name="state_machine_stats"} 54
# HELP tasks_errored_total Number of tasks completed with error
# TYPE tasks_errored_total counter
tasks_errored_total{otel_scope_name="state_machine_stats"} 1
# HELP tasks_in_progress Number of tasks in progress
# TYPE tasks_in_progress gauge
tasks_in_progress{task_type="default/simple_pipeline/generate_seq",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/simple_pipeline/make_it_string",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/simple_pipeline/square",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/simple_pipeline/sum_of_squares",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test/generate_seq",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test/square",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_context/SimpleFunctionCtxC",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_context/simple_function_ctx",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_context/simple_function_ctx_b",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_handle_file/handle_file",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_ignore_none/add_two",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_ignore_none/gen_seq",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_ignore_none/ignore_none",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_map_reduce/generate_seq",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_map_reduce/make_it_string",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_map_reduce/square",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_map_reduce/square_with_json_encoder",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_map_reduce/sum_of_squares",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_map_reduce/sum_of_squares_with_json_encoding",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_router/add_three",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_router/add_two",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_router/generate_seq",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_router/make_it_string_from_int",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_router/route_if_even",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_router/square",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_router/sum_of_squares",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_simple_function/simple_function",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_simple_function2/simple_function_multiple_inputs",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_simple_function2_json/simple_function_multiple_inputs_json",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_simple_function_with_invalid_encoding/simple_function_with_invalid_encoder",otel_scope_name="state_machine_stats"} 0
tasks_in_progress{task_type="default/test_simple_function_with_json_encoding/simple_function_with_json_encoder",otel_scope_name="state_machine_stats"} 0
# HELP tasks_per_executor Number of tasks per executor
# TYPE tasks_per_executor gauge
tasks_per_executor{executor_id="spDPTMi0lKPxdcOljMs9X",otel_scope_name="state_machine_stats"} 0

Contribution Checklist

  • If the python-sdk was changed, please run make fmt in python-sdk/.
  • If the server was changed, please run make fmt in server/.
  • Make sure all PR Checks are passing.

@diptanu diptanu requested a review from seriousben November 15, 2024 07:42
@diptanu diptanu merged commit 37ca70a into main Nov 15, 2024
6 checks passed
@diptanu diptanu deleted the metrics branch November 15, 2024 14:57
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.

1 participant