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

Telemetry with Posthog #147

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
21b6b61
initial work for Telemetry
pablodeymo Oct 18, 2024
e04d6e2
TelemetryConfig with capture_event
pablodeymo Oct 21, 2024
74ec9a3
Telemetry in OnceCell
pablodeymo Oct 22, 2024
a784c80
Reordering in a new file
pablodeymo Oct 22, 2024
45f64f6
adding telemetry call in get_operators_stake_in_quorums_at_block
pablodeymo Oct 22, 2024
8f3eaf4
Rename method new to set_config
pablodeymo Oct 22, 2024
a2fd71e
explanation of telemetry in README
pablodeymo Oct 22, 2024
2f2b820
README of eigen-telemetry improved
pablodeymo Oct 23, 2024
6190410
telemetry in other methods
pablodeymo Oct 25, 2024
0f7760e
Run telemetry in sync context
pablodeymo Oct 25, 2024
ab5029a
fixing await error
pablodeymo Oct 25, 2024
c1b3c28
Merge branch 'main' into telemetry
pablodeymo Nov 13, 2024
a169749
Cargo.lock updated
pablodeymo Nov 13, 2024
708a5ea
fake_backend fixed
pablodeymo Nov 13, 2024
f8ebd5a
telemetry calls in all the methods of avsregistry and elcontracts
pablodeymo Nov 15, 2024
0c5c6ea
Merge branch 'main' into telemetry
pablodeymo Dec 17, 2024
55de6b6
Fixing Cargo.toml in crates/chainio/clients/elcontracts
pablodeymo Dec 17, 2024
93a11f1
compilation fixes with telemetry feature
pablodeymo Dec 17, 2024
94b42ea
fix methods new
pablodeymo Dec 17, 2024
5148504
Fix ELChainReader::new and ELChainWriter::new
pablodeymo Dec 18, 2024
b68ce8e
Fix in get_operator_info.rs and register_operator_in_quorum_with_avs_…
pablodeymo Dec 18, 2024
6bfb9aa
Merge branch 'main' into telemetry
pablodeymo Dec 19, 2024
083a49e
cargo.toml
pablodeymo Dec 19, 2024
d0ff2d4
fix merge conflicts
lferrigno Jan 14, 2025
60c2743
chore: regenerate lockfile
MegaRedHand Jan 14, 2025
b392905
Merge branch 'main' into telemetry
pablodeymo Jan 20, 2025
278c7e4
.await removed
pablodeymo Jan 20, 2025
80b110a
eigen-telemetry version updated
pablodeymo Jan 20, 2025
0675551
await removed in ELChainWriter::new
pablodeymo Jan 20, 2025
31fa940
await removed in get_operator_info
pablodeymo Jan 20, 2025
758be40
clippy in ELChainWriter::new
pablodeymo Jan 20, 2025
3f3ff7d
change added to CHANGELOG
pablodeymo Jan 20, 2025
21ffe44
Merge branch 'main' into telemetry
pablodeymo Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 36 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
Each version will have a separate `Breaking Changes` section as well. To describe in how to upgrade from one version to another if needed

## [Unreleased]

### Added

* feat: Added Telemetry with Posthog <https://github.com/Layr-Labs/eigensdk-rs/pull/147>. This is implemented in the sub-crate `eigen-telemetry`.
* To enable and use telemetry in your avs/code, you need to include the SDK crates with the feature telemetry enabled. In the main function the code must set the config of the telemetry with the given parameters:

```rust
fn main() {
let _ = eigen_telemetry::telemetry::Telemetry::set_config("YOUR_TELEMETRY_KEY", "YOUR_USER_ID");
// ...
}
```

### Changed

* Changes in the way bindings are generated in [#245](https://github.com/Layr-Labs/eigensdk-rs/pull/243).
* The `bindings` target now generates the bindings using Docker with Foundry v0.3.0.
* The previous `bindings` target was renamed to `bindings_host`, as it runs without Docker. However the `bindings_host` target is for CI use only. To generate the bindings, please use the `bindings` target.


### Breaking changes

### Removed

## [0.1.3] - 2024-01-17

### Added 🎉
* feat: add rewards-v2 related functionality by @supernovahs in https://github.com/Layr-Labs/eigensdk-rs/pull/221

* feat: add rewards-v2 related functionality by @supernovahs in <https://github.com/Layr-Labs/eigensdk-rs/pull/221>
* New methods in `ELChainReader`:
* `get_operator_avs_split`
* `get_operator_pi_split`
Expand All @@ -32,43 +47,52 @@ Each version will have a separate `Breaking Changes` section as well. To describ
* Bindings updated for rewards-v2 core contracts release

### Breaking Changes 🛠
* feat!: remove delegation manager from `ELChainWriter` by @supernovahs in https://github.com/Layr-Labs/eigensdk-rs/pull/214

* feat!: remove delegation manager from `ELChainWriter` by @supernovahs in <https://github.com/Layr-Labs/eigensdk-rs/pull/214>
* `ELChainWriter::new` no longer receives the delegation manager address as first parameter.
* feat!: change way bindings are generated by @MegaRedHand in https://github.com/Layr-Labs/eigensdk-rs/pull/204
* feat!: change way bindings are generated by @MegaRedHand in <https://github.com/Layr-Labs/eigensdk-rs/pull/204>
* `eigen_utils::core` contains bindings related to core contracts
* `eigen_utils::middleware` contains bindings related to middleware contracts
* `eigen_utils::sdk` contains bindings related to the SDK (should only be used for testing)

### Documentation 📚
* docs: add CHANGELOG.md by @lferrigno in https://github.com/Layr-Labs/eigensdk-rs/pull/220

* docs: add CHANGELOG.md by @lferrigno in <https://github.com/Layr-Labs/eigensdk-rs/pull/220>

### Other Changes
* ci: change docker setup action for official one by @MegaRedHand in https://github.com/Layr-Labs/eigensdk-rs/pull/219
* docs: add error message for `cargo test` on darwin by @MegaRedHand in https://github.com/Layr-Labs/eigensdk-rs/pull/215
* test: fix `test_register_and_update_operator` by @ricomateo in https://github.com/Layr-Labs/eigensdk-rs/pull/223
* chore: update way anvil state dump is generated by @ricomateo in https://github.com/Layr-Labs/eigensdk-rs/pull/222
* fix: disable doctests on `eigen-utils` by @MegaRedHand in https://github.com/Layr-Labs/eigensdk-rs/pull/227
* chore: bump version by @MegaRedHand in https://github.com/Layr-Labs/eigensdk-rs/pull/228
* docs: add GitHub release changelog configuration by @MegaRedHand in https://github.com/Layr-Labs/eigensdk-rs/pull/229

* ci: change docker setup action for official one by @MegaRedHand in <https://github.com/Layr-Labs/eigensdk-rs/pull/219>
* docs: add error message for `cargo test` on darwin by @MegaRedHand in <https://github.com/Layr-Labs/eigensdk-rs/pull/215>
* test: fix `test_register_and_update_operator` by @ricomateo in <https://github.com/Layr-Labs/eigensdk-rs/pull/223>
* chore: update way anvil state dump is generated by @ricomateo in <https://github.com/Layr-Labs/eigensdk-rs/pull/222>
* fix: disable doctests on `eigen-utils` by @MegaRedHand in <https://github.com/Layr-Labs/eigensdk-rs/pull/227>
* chore: bump version by @MegaRedHand in <https://github.com/Layr-Labs/eigensdk-rs/pull/228>
* docs: add GitHub release changelog configuration by @MegaRedHand in <https://github.com/Layr-Labs/eigensdk-rs/pull/229>

## [0.1.2] - 2025-01-09

### Added

* Added retries with exponential backoff to send transactions in [#158](https://github.com/Layr-Labs/eigensdk-rs/pull/158)
* Added `query_registration_detail` method in [#162](https://github.com/Layr-Labs/eigensdk-rs/pull/162)
* Added clippy lints in `Cargo.toml` in [#159](https://github.com/Layr-Labs/eigensdk-rs/pull/159)
* Added BLS aggregation logger in [#154](https://github.com/Layr-Labs/eigensdk-rs/pull/154)
* Added `common` crate to `eigensdk` crate in [#213](https://github.com/Layr-Labs/eigensdk-rs/pull/213)

### Changed

* Updated `eigenlayer-middleware` to v0.4.3 (rewards release) in [#177](https://github.com/Layr-Labs/eigensdk-rs/pull/177)
* Fixed Holesky RPC provider URL in [#184](https://github.com/Layr-Labs/eigensdk-rs/pull/184)
* Fixed BLS signature logic in [#174](https://github.com/Layr-Labs/eigensdk-rs/pull/174)

### Removed

* Deleted `TxManager` in [#151](https://github.com/Layr-Labs/eigensdk-rs/pull/151)
* Removed `TxManager` crate import in [#211](https://github.com/Layr-Labs/eigensdk-rs/pull/211)
* Removed logs in `operatorsinfo` test in [#185](https://github.com/Layr-Labs/eigensdk-rs/pull/185)

### Documentation

* Added notes for running tests in [#194](https://github.com/Layr-Labs/eigensdk-rs/pull/194)
* Added "Contract Bindings" section to the README in [#178](https://github.com/Layr-Labs/eigensdk-rs/pull/178)
* Added "Branches" section to the README in [#200](https://github.com/Layr-Labs/eigensdk-rs/pull/200)
Expand Down
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ clippy.question_mark = "warn"
clippy.implicit_return = "allow"

[workspace.dependencies]
#misc
eigen-client-avsregistry = { path = "crates/chainio/clients/avsregistry" }
ark-bn254 = "0.5.0"
ark-ec = "0.5.0"
Expand All @@ -81,6 +82,7 @@ eigen-services-blsaggregation = { path = "crates/services/bls_aggregation" }
eigen-services-operatorsinfo = { path = "crates/services/operatorsinfo" }
eigen-signer = { path = "crates/signer/" }
eigen-testing-utils = { path = "testing/testing-utils" }
eigen-telemetry = { path = "crates/telemetry/" }
eigen-types = { path = "crates/types/" }
eigen-utils = { path = "crates/utils/" }
eigen-nodeapi = { path = "crates/nodeapi/" }
Expand Down Expand Up @@ -116,13 +118,8 @@ tokio = { version = "1.41", features = ["test-util", "full", "sync"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["json"] }
url = "2.5"

#misc
rust-bls-bn254 = { version = "0.2.1", features = ["std"] }
uuid = { version = "1.11", features = ["v4"] }


#misc
parking_lot = "0.12"


Expand All @@ -140,3 +137,5 @@ alloy = { version = "0.9", features = [

avsregistry-read = { path = "examples/avsregistry-read" }
avsregistry-write = { path = "examples/avsregistry-write" }

posthog-rs = "0.2.0"
9 changes: 7 additions & 2 deletions crates/chainio/clients/avsregistry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ license-file.workspace = true

[dependencies]
alloy.workspace = true
ark-ff.workspace = true
async-trait.workspace = true
num-bigint = "0.4.4"
eigen-types.workspace = true
eigen-crypto-bls.workspace = true
ark-ff.workspace = true
eigen-telemetry = { workspace = true, optional = true }
eigen-client-elcontracts.workspace = true
eigen-common.workspace = true
eigen-utils.workspace = true
eigen-logging.workspace = true
num-bigint = "0.4.4"
thiserror.workspace = true
tokio = { workspace = true, optional = true }
tracing.workspace = true

[lints]
Expand All @@ -30,3 +32,6 @@ eigen-testing-utils.workspace = true
hex = "0.4.3"
once_cell.workspace = true
tokio = { version = "1.37.0", features = ["test-util", "full", "sync"] }

[features]
telemetry = ["dep:eigen-telemetry", "dep:tokio"]
5 changes: 5 additions & 0 deletions crates/chainio/clients/avsregistry/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,14 @@ pub enum AvsRegistryError {
/// Invalid Signature
#[error("Invalid signature")]
InvalidSignature,

/// Parse BigInt
#[error("big int error")]
ParseBigIntError,

/// Telemetry error
#[error("Telemetry error")]
TelemetryError(String),
}

impl From<ElContractsError> for AvsRegistryError {
Expand Down
Loading
Loading