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

feat: add network tag to metrics #12733

Merged
merged 21 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d3b150c
add netwok tag to metrics
virajbhartiya Nov 28, 2024
747f087
Enhance metrics by adding network tag to daemon and miner commands
virajbhartiya Nov 29, 2024
e420b87
Update CHANGELOG
virajbhartiya Nov 29, 2024
83a2bca
minor fix
virajbhartiya Nov 29, 2024
a80b86b
Update cmd/lotus-miner/run.go
virajbhartiya Dec 4, 2024
1ab14ea
Update cmd/lotus/daemon.go
virajbhartiya Dec 4, 2024
3080368
chore: remove unused import
virajbhartiya Dec 10, 2024
78e0bf5
Merge branch 'master' into network-tag
virajbhartiya Dec 10, 2024
be5d79a
feat(metrics): add network tagging to context across multiple files
virajbhartiya Dec 11, 2024
65a02f6
refactor(imports): reorganize and clean up imports in rcmgr.go, manag…
virajbhartiya Dec 11, 2024
775cfac
feat(metrics): implement AddNetworkTag function for consistent networ…
virajbhartiya Dec 12, 2024
1244845
feat(metrics): update context tagging for network metrics in StorageA…
virajbhartiya Dec 12, 2024
01e8501
refactor(metrics): replace buildconstants with AddNetworkTag for cons…
virajbhartiya Dec 16, 2024
fc56efa
chore(metrics): remove AddNetworkTag calls from multiple files and up…
virajbhartiya Dec 17, 2024
b678818
Update CHANGELOG.md
rvagg Dec 17, 2024
729d0e9
Apply suggestions from code review
rvagg Dec 17, 2024
58bbd4f
Update storage/paths/db_index.go
rvagg Dec 17, 2024
410ec91
Merge branch 'master' into network-tag
rvagg Dec 17, 2024
1e2fe5f
Update CHANGELOG.md
rvagg Dec 17, 2024
c64b4df
Update CHANGELOG.md
rvagg Dec 18, 2024
2fa37a5
Merge branch 'master' into network-tag
rvagg Dec 18, 2024
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# UNRELEASED

- Add json output of tipsets to `louts chain list`. ([filecoin-project/lotus#12691](https://github.com/filecoin-project/lotus/pull/12691))
- Lotus now reports the network name in the metrics. ([filecoin-project/lotus#12733](https://github.com/filecoin-project/lotus/pull/12733))
rvagg marked this conversation as resolved.
Show resolved Hide resolved
rvagg marked this conversation as resolved.
Show resolved Hide resolved

# UNRELEASED v.1.32.0

Expand All @@ -29,6 +30,8 @@ The Lotus v1.31.0 release introduces the new `ChainIndexer` subsystem, enhancing
- Improve ETH-filter performance for nodes serving many clients. ([filecoin-project/lotus#12603](https://github.com/filecoin-project/lotus/pull/12603))
- Implement F3 utility CLIs to list the power table for a given instance and sum the proportional power of a set of actors that participate in a given instance. ([filecoin-project/lotus#12698](https://github.com/filecoin-project/lotus/pull/12698))

## Bug Fixes

rvagg marked this conversation as resolved.
Show resolved Hide resolved
## 🐛 Bug Fix Highlights
- Add logic to check if the miner's owner address is delegated (f4 address). If it is delegated, the `lotus-shed sectors termination-estimate` command now sends the termination state call using the worker ID. This fix resolves the issue where termination-estimate did not function correctly for miners with delegated owner addresses. ([filecoin-project/lotus#12569](https://github.com/filecoin-project/lotus/pull/12569))
- The Lotus Miner will now always mine on the latest chain head returned by lotus, even if that head has less "weight" than the previously seen head. This is necessary because F3 may end up finalizing a tipset with a lower weight, although this situation should be rare on the Filecoin mainnet. ([filecoin-project/lotus#12659](https://github.com/filecoin-project/lotus/pull/12659)) and ([filecoin-project/lotus#12690](https://github.com/filecoin-project/lotus/pull/12690))
Expand Down
6 changes: 5 additions & 1 deletion blockstore/splitstore/splitstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,11 @@ func Open(path string, ds dstore.Datastore, hot, cold bstore.Blockstore, cfg *Co
ss.txnViewsCond.L = &ss.txnViewsMx
ss.txnSyncCond.L = &ss.txnSyncMx
ss.chainSyncCond.L = &ss.chainSyncMx
ss.ctx, ss.cancel = context.WithCancel(context.Background())

baseCtx := context.Background()
ctx := metrics.AddNetworkTag(baseCtx)

ss.ctx, ss.cancel = context.WithCancel(ctx)

ss.reifyCond.L = &ss.reifyMx
ss.reifyPend = make(map[cid.Cid]struct{})
Expand Down
1 change: 1 addition & 0 deletions cmd/lotus-miner/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var runCmd = &cli.Command{
tag.Insert(metrics.Commit, build.CurrentCommit),
tag.Insert(metrics.NodeType, "miner"),
)
ctx = metrics.AddNetworkTag(ctx)
// Register all metric views
if err := view.Register(
metrics.MinerNodeViews...,
Expand Down
2 changes: 1 addition & 1 deletion cmd/lotus/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,12 @@ var DaemonCmd = &cli.Command{
default:
return fmt.Errorf("unrecognized profile type: %q", profile)
}

ctx, _ := tag.New(context.Background(),
tag.Insert(metrics.Version, build.NodeBuildVersion),
tag.Insert(metrics.Commit, build.CurrentCommit),
tag.Insert(metrics.NodeType, "chain"),
)
ctx = metrics.AddNetworkTag(ctx)
// Register all metric views
if err = view.Register(
metrics.ChainNodeViews...,
Expand Down
Loading