Skip to content

feat(telemetry): implement telemetry for aggregator#1077

Merged
uri-99 merged 56 commits intostagingfrom
1075-feattelemetry-implement-telemetry-for-aggregator
Oct 10, 2024
Merged

feat(telemetry): implement telemetry for aggregator#1077
uri-99 merged 56 commits intostagingfrom
1075-feattelemetry-implement-telemetry-for-aggregator

Conversation

@JuArce
Copy link
Copy Markdown
Collaborator

@JuArce JuArce commented Sep 25, 2024

Description

This PR supersedes #949

The aggregator has to communicate to the telemetry_api using HTTP endpoints
The telemetry_api will handle traces creation

closes #1075

Tasks

  • Docker compose with Otel Collector and Jaeger UI
  • Init traces on NewTask
  • Add span on Operator responses
  • Add span on Quorum Reached
  • Add span on Tasks errors (ie task expired)
  • Close traces after a period of time the quorum was reached to wait for most operators responses
  • Show operator not responding

How to Test

Tip

You will need a lot of terminals 😎

  1. Run anvil
make anvil_start_with_block_time
  1. Run aggregator
make aggregator_start
  1. Run batcher
make batcher_start_local
  1. Build operator
make build_operator
  1. Register operator 1
export OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8
make operator_full_registration CONFIG_FILE=config-files/config-operator-1.yaml
  1. Register operator 2
export OPERATOR_ADDRESS=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC
make operator_full_registration CONFIG_FILE=config-files/config-operator-2.yaml
  1. Register operator 3
export OPERATOR_ADDRESS=0x90F79bf6EB2c4f870365E785982E1f101E93b906
make operator_full_registration CONFIG_FILE=config-files/config-operator-3.yaml
  1. Run Telemetry
make telemetry_create_env
make telemetry_run_db
make open_telemetry_start
make telemetry_start 
  1. Run Operator 1
./operator/build/aligned-operator start --config ./config-files/config-operator-1.yaml
  1. Run Operator 2
./operator/build/aligned-operator start --config ./config-files/config-operator-2.yaml
  1. Run Opreator 3
./operator/build/aligned-operator start --config ./config-files/config-operator-3.yaml
  1. Send proofs
make batcher_send_burst_groth16
  1. Go to Jaeger UI and find the new traces

You should see traces like the following one

image image

@JuArce JuArce self-assigned this Sep 25, 2024
@JuArce JuArce changed the title feat: create and finish traces for specified merkle root feat(telemetry): implement telemetry for aggregator Sep 25, 2024
avilagaston9 and others added 13 commits October 1, 2024 13:41
Co-authored-by: Julian Ventura <julian.ventura@lambdaclass.com>
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator

# Conflicts:
#	telemetry_api/config/dev.exs
#	telemetry_api/mix.exs
#	telemetry_api/mix.lock
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator
fix: store address and operator_id in lowercase
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator
JuArce added 3 commits October 3, 2024 19:07
…-in-elixir' into 1075-feattelemetry-implement-telemetry-for-aggregator

# Conflicts:
#	telemetry_api/lib/telemetry_api_web/controllers/operator_controller.ex
@JuArce JuArce marked this pull request as ready for review October 4, 2024 14:27
Comment thread aggregator/internal/pkg/telemetry.go Outdated
Comment on lines +34 to +35
client *http.Client
baseURL *url.URL
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do these need to be pointers?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

They didn't. Changed them!

Comment thread telemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex Outdated
Base automatically changed from 998-refactortracker-rewrite-operator_tracker-in-elixir to staging October 4, 2024 18:34
Comment thread aggregator/internal/pkg/aggregator.go
Comment thread telemetry_api/config/dev.exs
Comment thread telemetry_api/lib/telemetry_api/operators.ex Outdated
Comment thread telemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex Outdated
Comment thread telemetry_api/lib/telemetry_api/traces.ex Outdated
@uri-99 uri-99 merged commit 18f64e9 into staging Oct 10, 2024
@uri-99 uri-99 deleted the 1075-feattelemetry-implement-telemetry-for-aggregator branch October 10, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

rewrite operator_tracker in elixir, add telemetry to it

6 participants