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

chore(tap): surface send error #21056

Merged
merged 2 commits into from
Aug 13, 2024
Merged

chore(tap): surface send error #21056

merged 2 commits into from
Aug 13, 2024

Conversation

pront
Copy link
Contributor

@pront pront commented Aug 12, 2024

A small improvement to error handling.

@pront pront requested a review from a team as a code owner August 12, 2024 18:55
lib/vector-tap/src/lib.rs Outdated Show resolved Hide resolved
@pront pront added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Aug 12, 2024
@pront pront requested a review from bruceg August 12, 2024 19:16
Copy link
Member

@jszwedko jszwedko left a comment

Choose a reason for hiding this comment

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

It seems like an alternative here would be for whatever is consuming from this channel to be able to handle empty Vecs of events. Was that considered too and this deemed as preferable? I could see it being informative to the receiver to receive an empty set of events (that is it could take action based on that condition).

@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Aug 12, 2024

Datadog Report

Branch report: pront/tap-empty-events-fix
Commit report: e71e599
Test service: vector

✅ 0 Failed, 7 Passed, 0 Skipped, 25.45s Total Time

Comment on lines 192 to 194
if sender_tx.send(output_events).await.is_err() {
warn!("Could not send tap events");
}
Copy link
Member

Choose a reason for hiding this comment

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

Ideally this should also report the error, but it is just a test and the error is unlikely…

Suggested change
if sender_tx.send(output_events).await.is_err() {
warn!("Could not send tap events");
}
if let Err(error) = sender_tx.send(output_events).await {
warn!("Could not send tap events: {error}");
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion 👍

@pront pront changed the title fix(tap): check if events are empty chore(tap): surface send error Aug 12, 2024
@pront
Copy link
Contributor Author

pront commented Aug 12, 2024

It seems like an alternative here would be for whatever is consuming from this channel to be able to handle empty Vecs of events. Was that considered too and this deemed as preferable? I could see it being informative to the receiver to receive an empty set of events (that is it could take action based on that condition).

This is a great point actually. An empty vector of events might be useful, e.g. it might indicate that all tap events were filtered out. I reverted this change. This PR is now just about surfacing a potential send error.

@pront pront requested a review from bruceg August 12, 2024 20:18
@pront pront added this pull request to the merge queue Aug 12, 2024
Copy link

Regression Detector Results

Run ID: 204136dc-7385-48b3-a764-330fa712757e Metrics dashboard

Baseline: b24e9ef
Comparison: 38fdd46

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +6.42 [-0.79, +13.63]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
file_to_blackhole egress throughput +6.42 [-0.79, +13.63]
syslog_log2metric_tag_cardinality_limit_blackhole ingress throughput +2.55 [+2.45, +2.65]
otlp_grpc_to_blackhole ingress throughput +2.04 [+1.92, +2.16]
fluent_elasticsearch ingress throughput +1.83 [+1.33, +2.34]
syslog_splunk_hec_logs ingress throughput +1.06 [+0.91, +1.21]
http_to_s3 ingress throughput +0.96 [+0.69, +1.23]
syslog_humio_logs ingress throughput +0.54 [+0.41, +0.67]
http_to_http_acks ingress throughput +0.50 [-0.82, +1.83]
socket_to_socket_blackhole ingress throughput +0.17 [+0.10, +0.24]
http_to_http_noack ingress throughput +0.10 [+0.04, +0.17]
datadog_agent_remap_blackhole ingress throughput +0.04 [-0.05, +0.14]
http_to_http_json ingress throughput +0.02 [-0.02, +0.07]
splunk_hec_to_splunk_hec_logs_noack ingress throughput +0.02 [-0.08, +0.12]
splunk_hec_to_splunk_hec_logs_acks ingress throughput -0.01 [-0.11, +0.09]
splunk_hec_indexer_ack_blackhole ingress throughput -0.01 [-0.09, +0.07]
datadog_agent_remap_datadog_logs_acks ingress throughput -0.18 [-0.39, +0.03]
syslog_log2metric_humio_metrics ingress throughput -0.25 [-0.40, -0.10]
datadog_agent_remap_datadog_logs ingress throughput -0.26 [-0.44, -0.09]
splunk_hec_route_s3 ingress throughput -0.30 [-0.63, +0.04]
http_text_to_http_json ingress throughput -1.02 [-1.15, -0.89]
http_elasticsearch ingress throughput -1.49 [-1.63, -1.35]
otlp_http_to_blackhole ingress throughput -1.60 [-1.75, -1.45]
syslog_loki ingress throughput -1.79 [-1.86, -1.73]
syslog_log2metric_splunk_hec_metrics ingress throughput -1.94 [-2.06, -1.83]
syslog_regex_logs2metric_ddmetrics ingress throughput -2.35 [-2.50, -2.20]
datadog_agent_remap_blackhole_acks ingress throughput -3.52 [-3.63, -3.41]

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

Merged via the queue into master with commit 38fdd46 Aug 13, 2024
66 checks passed
@pront pront deleted the pront/tap-empty-events-fix branch August 13, 2024 00:53
ym pushed a commit to ym/vector that referenced this pull request Aug 18, 2024
* fix(tap): check if events are empty

* repurpose PR
AndrooTheChen pushed a commit to discord/vector that referenced this pull request Sep 23, 2024
* fix(tap): check if events are empty

* repurpose PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Changes in this PR do not need user-facing explanations in the release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants