-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat(metrics): add custom collector metrics for spans received/rejeced by service #7335
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
base: main
Are you sure you want to change the base?
feat(metrics): add custom collector metrics for spans received/rejeced by service #7335
Conversation
@yurishkuro pls review |
return c.spanHandlers | ||
} | ||
|
||
type CollectorSpanMetrics struct { |
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.
we already have cmd/collector/app/metrics.go, what is missing there?
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.
@yurishkuro The existing metrics.go defines and creates metrics, but it doesn’t automatically update them when spans are processed. My change adds logic to increment the received and rejected counters for each span as they’re handled — that's what was missing.
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.
yes but your change also adds additional storage and lookups by service name, which are already implemented in the file I pointed to.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You may re-open it if you need more time. |
Resolves #7125
Which problem is this PR solving?
Adds new collector metrics to track spans received and rejected per service. This enables observability into which services are sending traces and how many are being rejected (e.g., due to sampling or validation issues).
Description of the changes
jaeger_collector_spans_received_by_svc_total
jaeger_collector_spans_rejected_by_svc_total
collector.ProcessSpans
logic to increment metrics for each batch.cmd/collector/app/collector.go
.How was this change tested?
curl
trace ingestion using OTLP HTTP.curl -s localhost:14269/metrics | grep jaeger_collector_spans_
Proof
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test