-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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: More detailed tracing for distributors #14504
base: main
Are you sure you want to change the base?
Conversation
def buckets Swap metrics for subspans in Distributor.push
@@ -304,6 +305,12 @@ func New( | |||
Help: "The number of records a single per-partition write request has been split into.", | |||
Buckets: prometheus.ExponentialBuckets(1, 2, 8), | |||
}), | |||
kafkaBytesPerRecord: promauto.With(registerer).NewHistogram(prometheus.HistogramOpts{ | |||
Namespace: constants.Loki, | |||
Name: "distributor_kafka_bytes_per_record", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I misunderstood, but it seems like either Name
or Help
is incorrect. Name
suggests this is record size, but Help
suggests this is the number of records, not the record size.
@@ -594,36 +601,40 @@ func (d *Distributor) Push(ctx context.Context, req *logproto.PushRequest) (*log | |||
const maxExpectedReplicationSet = 5 // typical replication factor 3 plus one for inactive plus one for luck | |||
var descs [maxExpectedReplicationSet]ring.InstanceDesc | |||
|
|||
tracker := pushTracker{ | |||
kafkaTracker := pushTracker{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something that is unclear to me is what was the behavior before when sharing a common tracker, and what is the behavior now having separate trackers?
In general LGTM, but a couple questions before I ✅ |
What this PR does / why we need it:
Improves the tracing in the distributor. Currently we just get a single span for the whole request.