Skip to content

feat(telemetry): implement telemetry for aggregator - #1077

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

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

Conversation

@JuArce

@JuArceJuArce commented Sep 25, 2024

Copy link
Copy Markdown
Collaborator

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

imageimage

@JuArceJuArce self-assigned this Sep 25, 2024
@JuArceJuArce changed the title feat: create and finish traces for specified merkle rootfeat(telemetry): implement telemetry for aggregatorSep 25, 2024
avilagaston9and 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
…-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 threadaggregator/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 threadtelemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex Outdated
Base automatically changed from 998-refactortracker-rewrite-operator_tracker-in-elixir to stagingOctober 4, 2024 18:34
Comment threadaggregator/internal/pkg/aggregator.go
Comment threadtelemetry_api/config/dev.exs
Comment threadtelemetry_api/lib/telemetry_api/operators.ex Outdated
Comment threadtelemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex Outdated
Comment threadtelemetry_api/lib/telemetry_api/traces.ex Outdated
@uri-99
uri-99 merged commit 18f64e9 into stagingOct 10, 2024
@uri-99
uri-99 deleted the 1075-feattelemetry-implement-telemetry-for-aggregator branch October 10, 2024 16:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

rewrite operator_tracker in elixir, add telemetry to it

6 participants

@JuArce@Oppen@uri-99@entropidelic@avilagaston9@JulianVentura