Skip to content

feat: implement trace total size logging#5625

Closed
sienna011022 wants to merge 4 commits intografana:mainfrom
sienna011022:feat/addTotalSizeLogging
Closed

feat: implement trace total size logging#5625
sienna011022 wants to merge 4 commits intografana:mainfrom
sienna011022:feat/addTotalSizeLogging

Conversation

@sienna011022
Copy link
Copy Markdown
Contributor

@sienna011022 sienna011022 commented Sep 8, 2025

What this PR does:

Adds total size logging functionality to track and log the cumulative size of traces processed by the ingester.
This enhancement provides better observability into trace data volume and helps with monitoring resource usage.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

}

func (s *Tracker) GetCurrentSize(traceID []byte) int {
token := s.token(traceID)
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.

you need to take the lock in this func to prevent concurrent map access. wdyt about just returning the trace size from .Allow() instead? it may be worth benchmarking the two approaches if you feel comfortable doing that.

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.

@joe-elliott thanks I made another PR and I did benchmarking.
It will be efficient if Allow() return the size

@joe-elliott
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott closed this Sep 9, 2025
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