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

Add telemetry for dropped data due to exporter sending queue overflow #3328

Merged

Conversation

dmitryax
Copy link
Member

This change adds internal metrics for dropped spans, metric points and log records when exporter sending queue is full:

  • exporter/enqueue_failed_metric_points
  • exporter/enqueue_failed_spans
  • exporter/enqueue_failed_log_records

@dmitryax dmitryax requested a review from a team May 27, 2021 07:06
exporter/exporterhelper/logs.go Outdated Show resolved Hide resolved
exporter/exporterhelper/logs.go Outdated Show resolved Hide resolved
Comment on lines 66 to 69
// RecordTracesEnqueueFailure records number of spans that failed to be added to the sending queue.
func (eor *Exporter) RecordTracesEnqueueFailure(ctx context.Context, numSpans int) {
_ = stats.RecordWithTags(ctx, eor.mutators, obsmetrics.ExporterFailedToEnqueueSpans.M(int64(numSpans)))
}
Copy link
Member

Choose a reason for hiding this comment

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

I want to think a bit more about this API, do you know any simple way to make this "private API" (internal) for the moment until we better understand the need?

Copy link
Member Author

Choose a reason for hiding this comment

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

Cannot think of any other way to arrange this without code duplication :(

Copy link
Member Author

Choose a reason for hiding this comment

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

Temporarily migrated to make it private with some code duplication

@dmitryax dmitryax force-pushed the expose-enqueue-failures-metric branch 2 times, most recently from a27155f to e6c6e57 Compare June 1, 2021 06:33
@dmitryax dmitryax closed this Jun 1, 2021
@dmitryax dmitryax reopened this Jun 1, 2021
This change adds internal metrics for dropped spans, metric points and log records when exporter sending queue is full:
- exporter/enqueue_failed_metric_points
- exporter/enqueue_failed_spans
- exporter/enqueue_failed_log_records
@dmitryax dmitryax force-pushed the expose-enqueue-failures-metric branch 3 times, most recently from 2bb405a to 78ca1b0 Compare June 2, 2021 23:24
By moving them to the package where they are being used. It requires some code duplication
@dmitryax dmitryax force-pushed the expose-enqueue-failures-metric branch from 78ca1b0 to c882e64 Compare June 3, 2021 00:52
@bogdandrutu bogdandrutu merged commit dc7899b into open-telemetry:main Jun 3, 2021
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