diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..9ecda1912 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,26 @@ +# TITLE + +## Description + +Description of the pull request changes and motivation. + +## Type of change + +Please delete options that are not relevant. + +- [ ] New feature +- [ ] Bug fix +- [ ] Optimization +- [ ] Refactor + +## Checklist +- [ ] Linked to Github Issue +- [ ] This change depends on code or research by an external entity + - [ ] Acknowledgements were updated to give credit +- [ ] Unit tests added +- [ ] This change requires new documentation. + - [ ] Documentation has been added/updated. +- [ ] This change is an Optimization + - [ ] Benchmarks added/run +- [ ] Has a known issue + - [Link to the open issue addressing it]() diff --git a/Makefile b/Makefile index 5375bc330..37d43b3ae 100644 --- a/Makefile +++ b/Makefile @@ -437,6 +437,7 @@ generate_groth16_ineq_proof: ## Run the gnark_plonk_bn254_script @go run scripts/test_files/gnark_groth16_bn254_infinite_script/cmd/main.go 1 __METRICS__: +# Prometheus and graphana run_metrics: ## Run metrics using metrics-docker-compose.yaml @echo "Running metrics..." @docker compose -f metrics-docker-compose.yaml up @@ -698,6 +699,10 @@ tracker_dump_db: @echo "Dumped database successfully to /operator_tracker" __TELEMETRY__: +# Collector, Jaeger and Elixir API +telemetry_full_start: open_telemetry_start telemetry_start + +# Collector and Jaeger open_telemetry_start: ## Run open telemetry services using telemetry-docker-compose.yaml @echo "Running telemetry..." @docker compose -f telemetry-docker-compose.yaml up -d @@ -706,6 +711,7 @@ open_telemetry_prod_start: ## Run open telemetry services with Cassandra using t @echo "Running telemetry for Prod..." @docker compose -f telemetry-prod-docker-compose.yaml up -d +# Elixir API telemetry_start: telemetry_run_db telemetry_ecto_migrate ## Run Telemetry API @cd telemetry_api && \ ./start.sh diff --git a/README.md b/README.md index 2191e59f8..38ef5fabf 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,19 @@ > To be used in testnet only. To learn more about Aligned and how to use it, refer to the [docs page](https://docs.alignedlayer.com/) or [docs folder](./docs/). + +# Acknowledgements + +Aligned wouldn't be possible without the valuable work of these people: +- [Ethereum](https://ethereum.org/en/), for being the network we all love +- [EigenLayer](https://www.eigenlayer.xyz) for providing restaking and AVS +- Shafi Goldwasser, Silvio Micali, and Charles Rackoff for [inventing ZK proofs](http://people.csail.mit.edu/silvio/Selected%20Scientific%20Papers/Proof%20Systems/The_Knowledge_Complexity_Of_Interactive_Proof_Systems.pdf) +- Eli Ben-Sasson and [Starkware](https://starkware.co) for making them practical +- [Consensys](https://consensys.io) for implementing the GROTH16 and PLONK protocols in [GNARK](https://docs.gnark.consensys.io) +- [RiscZero](https://risczero.com) for its namesake [proving system](https://github.com/risc0/risc0) +- [SuccintLabs](https://succinct.xyz) for creating [SP1](https://github.com/succinctlabs/sp1) +- [Paradigm](https://www.paradigm.xyz) for maintaining the [Ethers crate](https://crates.io/crates/ethers) and [Foundry](https://github.com/foundry-rs/foundry) +- [LambdaClass](https://lambdaclass.com) for writing [lambdaworks](https://github.com/lambdaclass/lambdaworks) + + +If you believe we missed someone, contact us! We're always happy to give credit where it's due. diff --git a/batcher/aligned-batcher/src/lib.rs b/batcher/aligned-batcher/src/lib.rs index 4189fadac..548a58543 100644 --- a/batcher/aligned-batcher/src/lib.rs +++ b/batcher/aligned-batcher/src/lib.rs @@ -13,11 +13,18 @@ use std::env; use std::net::SocketAddr; use std::sync::Arc; +use aligned_sdk::core::constants::{ + ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF, AGGREGATOR_GAS_COST, CONSTANT_GAS_COST, + DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER, DEFAULT_MAX_FEE_PER_PROOF, + GAS_PRICE_PERCENTAGE_MULTIPLIER, MIN_FEE_PER_PROOF, PERCENTAGE_DIVIDER, + RESPOND_TO_TASK_FEE_LIMIT_PERCENTAGE_MULTIPLIER, +}; use aligned_sdk::core::types::{ ClientMessage, NoncedVerificationData, ProofInvalidReason, ProvingSystemId, ResponseMessage, ValidityResponseMessage, VerificationCommitmentBatch, VerificationData, VerificationDataCommitment, }; + use aws_sdk_s3::client::Client as S3Client; use eth::payment_service::{ try_create_new_task, BatcherPaymentService, CreateNewTaskFeeParams, SignerMiddlewareT, @@ -48,20 +55,6 @@ pub mod sp1; pub mod types; mod zk_utils; -const AGGREGATOR_GAS_COST: u128 = 400_000; -const BATCHER_SUBMISSION_BASE_GAS_COST: u128 = 125_000; -pub(crate) const ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF: u128 = 13_000; -pub(crate) const CONSTANT_GAS_COST: u128 = - ((AGGREGATOR_GAS_COST * DEFAULT_AGGREGATOR_FEE_MULTIPLIER) / DEFAULT_AGGREGATOR_FEE_DIVIDER) - + BATCHER_SUBMISSION_BASE_GAS_COST; - -const DEFAULT_MAX_FEE_PER_PROOF: u128 = ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * 100_000_000_000; // gas_price = 100 Gwei = 0.0000001 ether (high gas price) -const MIN_FEE_PER_PROOF: u128 = ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * 100_000_000; // gas_price = 0.1 Gwei = 0.0000000001 ether (low gas price) -const RESPOND_TO_TASK_FEE_LIMIT_MULTIPLIER: u128 = 5; // to set the respondToTaskFeeLimit variable higher than fee_for_aggregator -const RESPOND_TO_TASK_FEE_LIMIT_DIVIDER: u128 = 2; -const DEFAULT_AGGREGATOR_FEE_MULTIPLIER: u128 = 3; // to set the feeForAggregator variable higher than what was calculated -const DEFAULT_AGGREGATOR_FEE_DIVIDER: u128 = 2; - pub struct Batcher { s3_client: S3Client, s3_bucket_name: String, @@ -1044,9 +1037,12 @@ impl Batcher { } } - if let Some(finalized_batch) = self.is_batch_ready(block_number, gas_price).await { + let modified_gas_price = gas_price * U256::from(GAS_PRICE_PERCENTAGE_MULTIPLIER) + / U256::from(PERCENTAGE_DIVIDER); + + if let Some(finalized_batch) = self.is_batch_ready(block_number, modified_gas_price).await { let batch_finalization_result = self - .finalize_batch(block_number, finalized_batch, gas_price) + .finalize_batch(block_number, finalized_batch, modified_gas_price) .await; // Resetting this here to avoid doing it on every return path of `finalize_batch` function @@ -1097,11 +1093,11 @@ impl Batcher { let fee_per_proof = U256::from(gas_per_proof) * gas_price; let fee_for_aggregator = (U256::from(AGGREGATOR_GAS_COST) * gas_price - * U256::from(DEFAULT_AGGREGATOR_FEE_MULTIPLIER)) - / U256::from(DEFAULT_AGGREGATOR_FEE_DIVIDER); + * U256::from(DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER)) + / U256::from(PERCENTAGE_DIVIDER); let respond_to_task_fee_limit = (fee_for_aggregator - * U256::from(RESPOND_TO_TASK_FEE_LIMIT_MULTIPLIER)) - / U256::from(RESPOND_TO_TASK_FEE_LIMIT_DIVIDER); + * U256::from(RESPOND_TO_TASK_FEE_LIMIT_PERCENTAGE_MULTIPLIER)) + / U256::from(PERCENTAGE_DIVIDER); let fee_params = CreateNewTaskFeeParams::new( fee_for_aggregator, fee_per_proof, diff --git a/batcher/aligned-sdk/src/core/constants.rs b/batcher/aligned-sdk/src/core/constants.rs index 844e39fa7..6b63dc491 100644 --- a/batcher/aligned-sdk/src/core/constants.rs +++ b/batcher/aligned-sdk/src/core/constants.rs @@ -2,16 +2,18 @@ pub const AGGREGATOR_GAS_COST: u128 = 400_000; pub const BATCHER_SUBMISSION_BASE_GAS_COST: u128 = 125_000; pub const ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF: u128 = 13_000; -pub const CONSTANT_GAS_COST: u128 = ((AGGREGATOR_GAS_COST * DEFAULT_AGGREGATOR_FEE_MULTIPLIER) - / DEFAULT_AGGREGATOR_FEE_DIVIDER) - + BATCHER_SUBMISSION_BASE_GAS_COST; +pub const CONSTANT_GAS_COST: u128 = + ((AGGREGATOR_GAS_COST * DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER) / PERCENTAGE_DIVIDER) + + BATCHER_SUBMISSION_BASE_GAS_COST; pub const DEFAULT_MAX_FEE_PER_PROOF: u128 = ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * 100_000_000_000; // gas_price = 100 Gwei = 0.0000001 ether (high gas price) pub const MIN_FEE_PER_PROOF: u128 = ADDITIONAL_SUBMISSION_GAS_COST_PER_PROOF * 100_000_000; // gas_price = 0.1 Gwei = 0.0000000001 ether (low gas price) -pub const RESPOND_TO_TASK_FEE_LIMIT_MULTIPLIER: u128 = 5; // to set the respondToTaskFeeLimit variable higher than fee_for_aggregator -pub const RESPOND_TO_TASK_FEE_LIMIT_DIVIDER: u128 = 2; -pub const DEFAULT_AGGREGATOR_FEE_MULTIPLIER: u128 = 3; // to set the feeForAggregator variable higher than what was calculated -pub const DEFAULT_AGGREGATOR_FEE_DIVIDER: u128 = 2; + +// % modifiers: (100% is x1, 10% is x0.1, 1000% is x10) +pub const RESPOND_TO_TASK_FEE_LIMIT_PERCENTAGE_MULTIPLIER: u128 = 250; // fee_for_aggregator -> respondToTaskFeeLimit modifier +pub const DEFAULT_AGGREGATOR_FEE_PERCENTAGE_MULTIPLIER: u128 = 150; // feeForAggregator modifier +pub const GAS_PRICE_PERCENTAGE_MULTIPLIER: u128 = 110; // gasPrice modifier +pub const PERCENTAGE_DIVIDER: u128 = 100; /// SDK /// /// Number of proofs we a batch for estimation. diff --git a/grafana/provisioning/dashboards/aligned/ethereum.json b/grafana/provisioning/dashboards/aligned/ethereum.json new file mode 100644 index 000000000..4c380cd48 --- /dev/null +++ b/grafana/provisioning/dashboards/aligned/ethereum.json @@ -0,0 +1,146 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 4, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "gwei", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 3, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 3, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "disableTextWrap": false, + "editorMode": "code", + "expr": "gas_price * 10^(-9)", + "fullMetaSearch": false, + "hide": false, + "includeNullMetadata": true, + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A", + "useBackend": false + } + ], + "title": "Gas Price", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Ethereum", + "uid": "cc1ca6ab-6a36-41e0-afcf-2946c15afde5", + "version": 6, + "weekStart": "" +} diff --git a/metrics/metrics.go b/metrics/metrics.go index 11c0829c4..04001ba70 100644 --- a/metrics/metrics.go +++ b/metrics/metrics.go @@ -4,6 +4,7 @@ import ( "context" "errors" "net/http" + "time" "github.com/Layr-Labs/eigensdk-go/logging" "github.com/prometheus/client_golang/prometheus" @@ -48,12 +49,23 @@ func NewMetrics(ipPortAddress string, reg prometheus.Registerer, logger logging. func (m *Metrics) Start(ctx context.Context, reg prometheus.Gatherer) <-chan error { m.logger.Infof("Starting metrics server at port %v", m.ipPortAddress) errC := make(chan error, 1) + + server := http.Server{ + Addr: m.ipPortAddress, + Handler: http.NewServeMux(), + ReadTimeout: 10 * time.Second, + WriteTimeout: 10 * time.Second, + IdleTimeout: 120 * time.Second, + MaxHeaderBytes: 1 << 20, // This is 1MB + } + + server.Handler.(*http.ServeMux).Handle("/metrics", promhttp.HandlerFor( + reg, + promhttp.HandlerOpts{}, + )) + go func() { - http.Handle("/metrics", promhttp.HandlerFor( - reg, - promhttp.HandlerOpts{}, - )) - err := http.ListenAndServe(m.ipPortAddress, nil) + err := server.ListenAndServe() if err != nil { errC <- errors.New("prometheus server failed") } else { diff --git a/prometheus/prometheus.yaml b/prometheus/prometheus.yaml index 51e416296..cc60fcab4 100644 --- a/prometheus/prometheus.yaml +++ b/prometheus/prometheus.yaml @@ -24,3 +24,10 @@ scrape_configs: - targets: [ "host.docker.internal:9093" ] labels: bot: "batcher" + + - job_name: "aligned-tracker" + scrape_interval: 1s + static_configs: + - targets: [ "host.docker.internal:4001" ] + labels: + bot: "tracker" diff --git a/scripts/fund_operator_devnet.sh b/scripts/fund_operator_devnet.sh index a716b8efb..7cee7b555 100755 --- a/scripts/fund_operator_devnet.sh +++ b/scripts/fund_operator_devnet.sh @@ -23,4 +23,5 @@ cast send --from $sender_address \ --value $amount_in_eth \ --private-key $sender_private_key \ --rpc-url "http://localhost:8545" \ - "$recipient_address" + "$recipient_address" \ + --gas-price $(cast gas-price --rpc-url "http://localhost:8545") diff --git a/scripts/user_fund_payment_service_devnet.sh b/scripts/user_fund_payment_service_devnet.sh index 4fca161be..0129606e4 100755 --- a/scripts/user_fund_payment_service_devnet.sh +++ b/scripts/user_fund_payment_service_devnet.sh @@ -19,4 +19,5 @@ cast send --from $USER_ADDRESS \ --value $amount_in_eth \ --private-key $USER_PRIVATE_KEY \ --rpc-url "http://localhost:8545" \ - "$batcher_payment_service_address" + "$batcher_payment_service_address" \ + --gas-price $(cast gas-price --rpc-url "http://localhost:8545") diff --git a/telemetry_api/.env.dev b/telemetry_api/.env.dev index 1a33ddc8e..61589ee21 100644 --- a/telemetry_api/.env.dev +++ b/telemetry_api/.env.dev @@ -1,3 +1,4 @@ -ALIGNED_CONFIG_FILE="../contracts/script/output/devnet/alignedlayer_deployment_output.json" -OPERATOR_FETCHER_WAIT_TIME_MS=5000 -ENVIRONMENT=devnet +export ALIGNED_CONFIG_FILE="../contracts/script/output/devnet/alignedlayer_deployment_output.json" +export OPERATOR_FETCHER_WAIT_TIME_MS=5000 +export ENVIRONMENT=devnet +export RPC_URL=http://localhost:8545 diff --git a/telemetry_api/config/dev.exs b/telemetry_api/config/dev.exs index 9f9ae0ad1..1e8b1a2c3 100644 --- a/telemetry_api/config/dev.exs +++ b/telemetry_api/config/dev.exs @@ -63,8 +63,14 @@ config :phoenix, :stacktrace_depth, 20 # Initialize plugs at runtime for faster development compilation config :phoenix, :plug_init_mode, :runtime +# Node RPC URL +rpc_url = System.get_env("RPC_URL") || + raise """ + environment variable RPC_URL is missing. + """ + # Configure ethereumex url -config :ethereumex, url: "http://localhost:8545" +config :ethereumex, url: rpc_url # For development, we use the stdout exporter to ensure everything is working properly # config :opentelemetry, traces_exporter: {:otel_exporter_stdout, []} diff --git a/telemetry_api/lib/telemetry_api/application.ex b/telemetry_api/lib/telemetry_api/application.ex index a49c52c19..5472a0bb0 100644 --- a/telemetry_api/lib/telemetry_api/application.ex +++ b/telemetry_api/lib/telemetry_api/application.ex @@ -7,6 +7,8 @@ defmodule TelemetryApi.Application do @impl true def start(_type, _args) do + TelemetryApi.MetricsExporter.setup() + children = [ TraceStore, TelemetryApiWeb.Telemetry, @@ -17,7 +19,7 @@ defmodule TelemetryApi.Application do # {TelemetryApi.Worker, arg}, # Start to serve requests, typically the last entry TelemetryApiWeb.Endpoint, - TelemetryApi.Periodic.OperatorFetcher + TelemetryApi.Periodically ] # See https://hexdocs.pm/elixir/Supervisor.html diff --git a/telemetry_api/lib/telemetry_api/contract_managers/operator_state_retriever.ex b/telemetry_api/lib/telemetry_api/contract_managers/operator_state_retriever.ex index a7ed9fbd6..a315e5abf 100644 --- a/telemetry_api/lib/telemetry_api/contract_managers/operator_state_retriever.ex +++ b/telemetry_api/lib/telemetry_api/contract_managers/operator_state_retriever.ex @@ -46,6 +46,7 @@ defmodule TelemetryApi.ContractManagers.OperatorStateRetriever do parse_operators(operators_state) else {:error, %{reason: :econnrefused}} -> {:error, "Blockchain is not reachable"} + {:error, reason} -> {:error, reason} end end diff --git a/telemetry_api/lib/telemetry_api/ethereum_metrics.ex b/telemetry_api/lib/telemetry_api/ethereum_metrics.ex new file mode 100644 index 000000000..2db78d6d1 --- /dev/null +++ b/telemetry_api/lib/telemetry_api/ethereum_metrics.ex @@ -0,0 +1,12 @@ +defmodule TelemetryApi.EthereumMetrics do + use Prometheus.Metric + + @gauge [name: :gas_price, help: "Ethereum Gas Price.", labels: []] + + def new_gas_price(gas_price) do + Gauge.set( + [name: :gas_price, labels: []], + gas_price + ) + end +end diff --git a/telemetry_api/lib/telemetry_api/metrics_exporter.ex b/telemetry_api/lib/telemetry_api/metrics_exporter.ex new file mode 100644 index 000000000..65ebf7c34 --- /dev/null +++ b/telemetry_api/lib/telemetry_api/metrics_exporter.ex @@ -0,0 +1,3 @@ +defmodule TelemetryApi.MetricsExporter do + use Prometheus.PlugExporter +end diff --git a/telemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex b/telemetry_api/lib/telemetry_api/periodically.ex similarity index 77% rename from telemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex rename to telemetry_api/lib/telemetry_api/periodically.ex index 23fd509fe..6aae11982 100644 --- a/telemetry_api/lib/telemetry_api/periodic/operator_fetcher.ex +++ b/telemetry_api/lib/telemetry_api/periodically.ex @@ -1,6 +1,7 @@ -defmodule TelemetryApi.Periodic.OperatorFetcher do +defmodule TelemetryApi.Periodically do use GenServer alias TelemetryApi.Operators + alias TelemetryApi.EthereumMetrics alias TelemetryApi.ContractManagers.RegistryCoordinatorManager require Logger @@ -30,6 +31,8 @@ defmodule TelemetryApi.Periodic.OperatorFetcher do end def send_work() do + one_second = 1000 + :timer.send_interval(one_second * 10, :gas_price) # every 10 seconds, once per block + some margin :timer.send_interval(@wait_time_ms, :poll_service) end @@ -39,6 +42,16 @@ defmodule TelemetryApi.Periodic.OperatorFetcher do {:noreply, state} end + def handle_info(:gas_price, _state) do + case Ethers.current_gas_price() do + {:ok, gas_price} -> + EthereumMetrics.new_gas_price(gas_price) + + {:error, error} -> + IO.inspect("Error fetching gas price: #{error}") + end + {:noreply, %{}} + end defp fetch_operators_info() do case Operators.fetch_all_operators() do :ok -> :ok diff --git a/telemetry_api/lib/telemetry_api_web/endpoint.ex b/telemetry_api/lib/telemetry_api_web/endpoint.ex index 897e4939d..fa4eabb5b 100644 --- a/telemetry_api/lib/telemetry_api_web/endpoint.ex +++ b/telemetry_api/lib/telemetry_api_web/endpoint.ex @@ -44,6 +44,7 @@ defmodule TelemetryApiWeb.Endpoint do pass: ["*/*"], json_decoder: Phoenix.json_library() + plug TelemetryApi.MetricsExporter plug Plug.MethodOverride plug Plug.Head plug Plug.Session, @session_options diff --git a/telemetry_api/mix.exs b/telemetry_api/mix.exs index 3c182a958..280e2bb4f 100644 --- a/telemetry_api/mix.exs +++ b/telemetry_api/mix.exs @@ -13,7 +13,9 @@ defmodule TelemetryApi.MixProject do applications: [ # https://opentelemetry.io/docs/languages/erlang/exporters/#setting-up-the-collector opentelemetry_exporter: :permanent, - opentelemetry: :temporary + opentelemetry: :temporary, + prometheus_ex: :permanent, + prometheus_plugs: :permanent ] ] ], @@ -58,7 +60,8 @@ defmodule TelemetryApi.MixProject do {:opentelemetry, "~> 1.3"}, {:opentelemetry_api, "~> 1.2"}, {:opentelemetry_exporter, "~> 1.6"}, - {:ex_keccak, "~> 0.7.5"} + {:prometheus_ex, "~> 3.0"}, + {:prometheus_plugs, "~> 1.0"} ] end diff --git a/telemetry_api/mix.lock b/telemetry_api/mix.lock index 0d3d1123e..df098cf7c 100644 --- a/telemetry_api/mix.lock +++ b/telemetry_api/mix.lock @@ -1,4 +1,5 @@ %{ + "accept": {:hex, :accept, "0.3.5", "b33b127abca7cc948bbe6caa4c263369abf1347cfa9d8e699c6d214660f10cd1", [:rebar3], [], "hexpm", "11b18c220bcc2eab63b5470c038ef10eb6783bcb1fcdb11aa4137defa5ac1bb8"}, "acceptor_pool": {:hex, :acceptor_pool, "1.0.0", "43c20d2acae35f0c2bcd64f9d2bde267e459f0f3fd23dab26485bf518c281b21", [:rebar3], [], "hexpm", "0cbcd83fdc8b9ad2eee2067ef8b91a14858a5883cb7cd800e6fcd5803e158788"}, "bandit": {:hex, :bandit, "1.5.7", "6856b1e1df4f2b0cb3df1377eab7891bec2da6a7fd69dc78594ad3e152363a50", [:mix], [{:hpax, "~> 1.0.0", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 1.0", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "f2dd92ae87d2cbea2fa9aa1652db157b6cba6c405cb44d4f6dd87abba41371cd"}, "castore": {:hex, :castore, "1.0.8", "dedcf20ea746694647f883590b82d9e96014057aff1d44d03ec90f36a5c0dc6e", [:mix], [], "hexpm", "0b2b66d2ee742cb1d9cb8c8be3b43c3a70ee8651f37b75a8b982e036752983f1"}, @@ -47,6 +48,13 @@ "plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"}, "poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"}, "postgrex": {:hex, :postgrex, "0.19.1", "73b498508b69aded53907fe48a1fee811be34cc720e69ef4ccd568c8715495ea", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "8bac7885a18f381e091ec6caf41bda7bb8c77912bb0e9285212829afe5d8a8f8"}, + "prometheus": {:hex, :prometheus, "4.11.0", "b95f8de8530f541bd95951e18e355a840003672e5eda4788c5fa6183406ba29a", [:mix, :rebar3], [{:quantile_estimator, "~> 0.2.1", [hex: :quantile_estimator, repo: "hexpm", optional: false]}], "hexpm", "719862351aabf4df7079b05dc085d2bbcbe3ac0ac3009e956671b1d5ab88247d"}, + "prometheus_ecto": {:hex, :prometheus_ecto, "1.4.3", "3dd4da1812b8e0dbee81ea58bb3b62ed7588f2eae0c9e97e434c46807ff82311", [:mix], [{:ecto, "~> 2.0 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.1 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}], "hexpm", "8d66289f77f913b37eda81fd287340c17e61a447549deb28efc254532b2bed82"}, + "prometheus_ex": {:hex, :prometheus_ex, "3.1.0", "98bdb1e9aea5001bc5f58752259d832447c06dd335cb246e89b497e2c4ec7de6", [:mix], [{:prometheus, "~> 4.0", [hex: :prometheus, repo: "hexpm", optional: false]}], "hexpm", "bc584d33aabae94ce75d477eb66c7178755b45a09afb7addb253d90eb66021de"}, + "prometheus_phoenix": {:hex, :prometheus_phoenix, "1.3.0", "c4b527e0b3a9ef1af26bdcfbfad3998f37795b9185d475ca610fe4388fdd3bb5", [:mix], [{:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.3 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}], "hexpm", "c4d1404ac4e9d3d963da601db2a7d8ea31194f0017057fabf0cfb9bf5a6c8c75"}, + "prometheus_plugs": {:hex, :prometheus_plugs, "1.1.5", "25933d48f8af3a5941dd7b621c889749894d8a1082a6ff7c67cc99dec26377c5", [:mix], [{:accept, "~> 0.1", [hex: :accept, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.1 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}, {:prometheus_process_collector, "~> 1.1", [hex: :prometheus_process_collector, repo: "hexpm", optional: true]}], "hexpm", "0273a6483ccb936d79ca19b0ab629aef0dba958697c94782bb728b920dfc6a79"}, + "prometheus_process_collector": {:hex, :prometheus_process_collector, "1.6.0", "b169e224337497cd858da16f9361edabc5931b9d12201a97ee15d88ef5a6fcaa", [:rebar3], [{:prometheus, "~> 4.0", [hex: :prometheus, repo: "hexpm", optional: false]}], "hexpm", "e9cd9846f204de7a04863f56308d8d1193bec714210bf6374d9d4fc088d2896d"}, + "quantile_estimator": {:hex, :quantile_estimator, "0.2.1", "ef50a361f11b5f26b5f16d0696e46a9e4661756492c981f7b2229ef42ff1cd15", [:rebar3], [], "hexpm", "282a8a323ca2a845c9e6f787d166348f776c1d4a41ede63046d72d422e3da946"}, "rustler_precompiled": {:hex, :rustler_precompiled, "0.8.1", "8afe0b6f3a9a677ada046cdd23e3f4c6399618b91a6122289324774961281e1e", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "90b8c2297bf7959cfa1c927b2881faad7bb0707183124955369991b76177a166"}, "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "telemetry": {:hex, :telemetry, "1.3.0", "fedebbae410d715cf8e7062c96a1ef32ec22e764197f70cda73d82778d61e7a2", [:rebar3], [], "hexpm", "7015fc8919dbe63764f4b4b87a95b7c0996bd539e0d499be6ec9d7f3875b79e6"}, diff --git a/telemetry_api/start.sh b/telemetry_api/start.sh index 41148952d..5855bbb3b 100755 --- a/telemetry_api/start.sh +++ b/telemetry_api/start.sh @@ -2,17 +2,6 @@ source .env -# Add new environment variables here -env_vars=( - "ENVIRONMENT" - "ALIGNED_CONFIG_FILE" - "OPERATOR_FETCHER_WAIT_TIME_MS" -) - -for var in "${env_vars[@]}"; do - export "$var=${!var}" -done - mix compile --force #force recompile to get the latest .env values elixir --sname telemetry -S mix phx.server