Skip to content

Add POSIX Antispam Metrics#913

Merged
phbnf merged 10 commits into
transparency-dev:mainfrom
phbnf:as_metrics
Mar 23, 2026
Merged

Add POSIX Antispam Metrics#913
phbnf merged 10 commits into
transparency-dev:mainfrom
phbnf:as_metrics

Conversation

@phbnf
Copy link
Copy Markdown
Contributor

@phbnf phbnf commented Mar 23, 2026

Towards #912.

This PR adds a few Antispam metrics for:

  • Lookups
  • Follower Transactions
  • Garbage Collection

@phbnf phbnf requested a review from a team as a code owner March 23, 2026 14:03
@phbnf phbnf requested review from AlCutter and roger2hk and removed request for roger2hk March 23, 2026 14:03
gcCounter.Add(ctx, 1, attr)
gcDuration.Record(ctx, float64(time.Since(start).Microseconds())/1000.0, attr)
if err == nil {
goto again
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be interesting to have a histogram of "how many immediately-successive GC runs before hitting no_rewrite"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How it counts the number of success instead of counting the number of no_rewrite :)

Comment thread storage/posix/antispam/otel.go Outdated
}

followTxnEntriesCounter, err = meter.Int64Histogram(
"tessera.antispam.badger.FollowTxn.entries.count",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe lowercase FollowTxn / follow_txn - all other names are lowercase.

}

followTxnDuration, err = meter.Float64Histogram(
"tessera.antispam.badger.FollowTxn.duration",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(same here)

@phbnf phbnf merged commit 7a95380 into transparency-dev:main Mar 23, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants