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

Reduce logging #3564

Merged
merged 2 commits into from
Apr 19, 2024
Merged

Reduce logging #3564

merged 2 commits into from
Apr 19, 2024

Conversation

trask
Copy link
Member

@trask trask commented Mar 1, 2024

No description provided.

@@ -236,7 +236,7 @@ private BatchItemProcessor initBatchItemProcessor(
if (tempDir == null) {
telemetryPipelineListener =
new DiagnosticTelemetryPipelineListener(
"Sending telemetry to the ingestion service", false, " (telemetry will be lost)");
"Sending telemetry to the ingestion service", true, " (telemetry will be lost)");
Copy link
Member Author

@trask trask Mar 1, 2024

Choose a reason for hiding this comment

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

this looks like a bug, 3rd arg isn't even used when 2nd arg is false

Copy link
Contributor

Choose a reason for hiding this comment

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

tempDir is null.. written to disk is not possible. retries will be false. i don't get it why it becomes true.

Copy link
Member Author

Choose a reason for hiding this comment

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

2nd arg controls logging, not writing to disk

@trask trask marked this pull request as ready for review March 7, 2024 23:30
@trask trask requested review from heyams and ramthi as code owners March 7, 2024 23:30
@@ -245,8 +245,8 @@ private BatchItemProcessor initBatchItemProcessor(
// will log if that retry from disk fails
new DiagnosticTelemetryPipelineListener(
"Sending telemetry to the ingestion service",
true,
" (telemetry will be stored to disk and retried)"),
false,
Copy link
Contributor

Choose a reason for hiding this comment

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

not get it why it's false here.

Copy link
Member Author

Choose a reason for hiding this comment

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

so that we only log the 2nd time a batch fails (when retrying from disk)

@@ -236,17 +236,15 @@ private BatchItemProcessor initBatchItemProcessor(
if (tempDir == null) {
telemetryPipelineListener =
new DiagnosticTelemetryPipelineListener(
"Sending telemetry to the ingestion service", false, " (telemetry will be lost)");
"Sending telemetry to the ingestion service", true, " (telemetry will be lost)");
} else {
telemetryPipelineListener =
TelemetryPipelineListener.composite(
// suppress warnings on retryable failures, in order to reduce sporadic/annoying
Copy link
Contributor

Choose a reason for hiding this comment

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

please update the comment.. this is not what it's actually doing

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the comment is correct, can you double check?

@trask trask merged commit 2a24671 into main Apr 19, 2024
85 checks passed
@trask trask deleted the reduce-logging branch April 19, 2024 14:47
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.

3 participants