-
Couldn't load subscription status.
- Fork 1k
Add OpenTelemetry plugin for comprehensive observability #4092
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
Open
Parent:
Merge `Dev` Into `neo-build.dev`
Jim8y
wants to merge
38
commits into
dev
Choose a base branch
from
feature/opentelemetry
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
9b9be47
[`ut`] 100% Coverage Trie.Get (#3952)
shargon e254f77
Add OpenTelemetry plugin for comprehensive observability
Jim8y ba6f233
Add OpenTelemetry observability plugin for Neo N3
Jim8y 21315dd
Add comprehensive node overview dashboard with system metrics
Jim8y 5b80749
Apply code formatting to OpenTelemetry plugin
Jim8y f74743b
Fix test project configuration for CI compatibility
Jim8y 318d18a
Merge branch 'dev' into feature/opentelemetry
cschuchardt88 8ee278f
Merge branch 'dev' into feature/opentelemetry
Jim8y c4b9b0a
Merge branch 'dev' into feature/opentelemetry
Jim8y e4bcdae
address shargon's comments
Jim8y 5eb651c
delete unnecessary files
Jim8y ced50d7
Merge branch 'feature/opentelemetry' of github.com:neo-project/neo in…
Jim8y 375ac02
remove unnecessary files
Jim8y 3941da7
Add comprehensive OpenTelemetry observability plugin for Neo blockchain
Jim8y 59afa1a
Apply suggestions from code review
shargon d245222
refactor(opentelemetry): apply PR feedback improvements
Jim8y e766067
docs: document core modifications issue and refactoring plan
Jim8y 1d56de8
refactor(opentelemetry): implement metrics collection without core mo…
Jim8y d248491
feat(opentelemetry): complete production-ready implementation
Jim8y 767b9ac
feat(opentelemetry): enhance telemetry system with professional monit…
Jim8y d16566f
feat(opentelemetry): add deployment verification and startup scripts
Jim8y 07f0770
merge: resolve conflicts with master branch
Jim8y b3299d2
merge: resolve conflicts with dev branch
Jim8y 54e4f39
fix: update OpenTelemetry packages to resolve security vulnerability
Jim8y f8add87
chore: clean up PR - remove unnecessary files and core modifications
Jim8y 92089ff
fix: resolve merge conflicts and apply code formatting
Jim8y 355c395
fix: add nullable reference types to test project
Jim8y b02ef9e
fix: use Assert.ThrowsExactly instead of Assert.ThrowsException
Jim8y 7fde360
fix: simplify OTelPlugin tests to resolve compilation errors
Jim8y ae7021d
feat: add comprehensive monitoring setup with dashboards and alerts
Jim8y 383a456
feat(monitoring): enhance Neo dashboard with comprehensive metrics
Jim8y de82fa3
feat(monitoring): add validation scripts and fix docker-compose
Jim8y 48adf4d
feat(monitoring): add testing infrastructure and verification tools
Jim8y f3e0415
feat(monitoring): implement production-ready monitoring with professi…
Jim8y 737248b
feat(dashboard): implement enterprise-grade professional monitoring d…
Jim8y a05f56b
fix(dashboard): remove all sample data - 100% real metrics only
Jim8y b0016a6
Merge branch 'dev' into feature/opentelemetry
NGDAdmin e343ca0
Merge branch 'dev' into feature/opentelemetry
shargon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| // Copyright (C) 2015-2025 The Neo Project. | ||
| // | ||
| // IMemPoolMetricsHandler.cs file belongs to the neo project and is free | ||
| // software distributed under the MIT software license, see the | ||
| // accompanying file LICENSE in the main directory of the | ||
| // repository or http://www.opensource.org/licenses/mit-license.php | ||
| // for more details. | ||
| // | ||
| // Redistribution and use in source and binary forms with or without | ||
| // modifications are permitted. | ||
|
|
||
| using Neo.Ledger; | ||
|
|
||
| namespace Neo.IEventHandlers | ||
| { | ||
| /// <summary> | ||
| /// Interface for plugins that need to collect memory pool metrics | ||
| /// </summary> | ||
| public interface IMemPoolMetricsHandler | ||
| { | ||
| /// <summary> | ||
| /// Called periodically with memory pool statistics | ||
| /// </summary> | ||
| /// <param name="memPool">The memory pool instance</param> | ||
| /// <param name="stats">Current memory pool statistics</param> | ||
| void MemPool_StatsSnapshot_Handler(MemoryPool memPool, MemPoolStats stats); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Memory pool statistics snapshot | ||
| /// </summary> | ||
| public class MemPoolStats | ||
| { | ||
| public int Count { get; set; } | ||
| public int VerifiedCount { get; set; } | ||
| public int UnverifiedCount { get; set; } | ||
| public int Capacity { get; set; } | ||
| public long TotalMemoryBytes { get; set; } | ||
| public int ConflictsCount { get; set; } | ||
| public int LastBatchRemovedCount { get; set; } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| // Copyright (C) 2015-2025 The Neo Project. | ||
| // | ||
| // INetworkMetricsHandler.cs file belongs to the neo project and is free | ||
| // software distributed under the MIT software license, see the | ||
| // accompanying file LICENSE in the main directory of the | ||
| // repository or http://www.opensource.org/licenses/mit-license.php | ||
| // for more details. | ||
| // | ||
| // Redistribution and use in source and binary forms with or without | ||
| // modifications are permitted. | ||
|
|
||
| using Akka.Actor; | ||
| using Neo.Network.P2P; | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace Neo.IEventHandlers | ||
| { | ||
| /// <summary> | ||
| /// Interface for plugins that need to collect network metrics | ||
| /// </summary> | ||
| public interface INetworkMetricsHandler | ||
| { | ||
| /// <summary> | ||
| /// Called when a peer connects to the network | ||
| /// </summary> | ||
| /// <param name="node">The local node instance</param> | ||
| /// <param name="peer">The connected peer</param> | ||
| void Network_PeerConnected_Handler(LocalNode node, IActorRef peer); | ||
|
|
||
| /// <summary> | ||
| /// Called when a peer disconnects from the network | ||
| /// </summary> | ||
| /// <param name="node">The local node instance</param> | ||
| /// <param name="peer">The disconnected peer</param> | ||
| void Network_PeerDisconnected_Handler(LocalNode node, IActorRef peer); | ||
|
|
||
| /// <summary> | ||
| /// Called periodically with network statistics | ||
| /// </summary> | ||
| /// <param name="node">The local node instance</param> | ||
| /// <param name="stats">Current network statistics</param> | ||
| void Network_StatsSnapshot_Handler(LocalNode node, NetworkStats stats); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Network statistics snapshot | ||
| /// </summary> | ||
| public class NetworkStats | ||
Jim8y marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| public int ConnectedPeers { get; set; } | ||
| public int UnconnectedPeers { get; set; } | ||
| public long BytesSent { get; set; } | ||
| public long BytesReceived { get; set; } | ||
| public int PendingTasks { get; set; } | ||
| public int HighPriorityQueueSize { get; set; } | ||
| public int LowPriorityQueueSize { get; set; } | ||
| public Dictionary<string, long> MessagesSentByType { get; set; } = new Dictionary<string, long>(); | ||
| public Dictionary<string, long> MessagesReceivedByType { get; set; } = new Dictionary<string, long>(); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| // Copyright (C) 2015-2025 The Neo Project. | ||
| // | ||
| // IStorageMetricsHandler.cs file belongs to the neo project and is free | ||
| // software distributed under the MIT software license, see the | ||
| // accompanying file LICENSE in the main directory of the | ||
| // repository or http://www.opensource.org/licenses/mit-license.php | ||
| // for more details. | ||
| // | ||
| // Redistribution and use in source and binary forms with or without | ||
| // modifications are permitted. | ||
|
|
||
| using Neo.Persistence; | ||
| using System; | ||
|
|
||
| namespace Neo.IEventHandlers | ||
| { | ||
| /// <summary> | ||
| /// Interface for plugins that need to collect storage metrics | ||
| /// </summary> | ||
| public interface IStorageMetricsHandler | ||
| { | ||
| /// <summary> | ||
| /// Called when a storage read operation occurs | ||
| /// </summary> | ||
| /// <param name="store">The store instance</param> | ||
| /// <param name="key">The key being read</param> | ||
| /// <param name="found">Whether the key was found</param> | ||
| /// <param name="duration">Time taken for the operation</param> | ||
| void Storage_Read_Handler(IStore store, byte[] key, bool found, TimeSpan duration); | ||
|
|
||
| /// <summary> | ||
| /// Called when a storage write operation occurs | ||
| /// </summary> | ||
| /// <param name="store">The store instance</param> | ||
| /// <param name="key">The key being written</param> | ||
| /// <param name="valueSize">Size of the value in bytes</param> | ||
| /// <param name="duration">Time taken for the operation</param> | ||
| void Storage_Write_Handler(IStore store, byte[] key, int valueSize, TimeSpan duration); | ||
|
|
||
| /// <summary> | ||
| /// Called periodically with storage statistics | ||
| /// </summary> | ||
| /// <param name="store">The store instance</param> | ||
| /// <param name="stats">Current storage statistics</param> | ||
| void Storage_StatsSnapshot_Handler(IStore store, StorageStats stats); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Storage statistics snapshot | ||
| /// </summary> | ||
| public class StorageStats | ||
| { | ||
| public long TotalReads { get; set; } | ||
| public long TotalWrites { get; set; } | ||
| public long CacheHits { get; set; } | ||
| public long CacheMisses { get; set; } | ||
| public double CacheHitRate => TotalReads > 0 ? (double)CacheHits / TotalReads : 0; | ||
| public long StorageSizeBytes { get; set; } | ||
| public int SnapshotCount { get; set; } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.