Skip to content

feat(component validation): validate component_discarded_events_total for sources#17981

Closed
neuronull wants to merge 4 commits intoneuronull/draft_component_validation_better_validationfrom
neuronull/component_validation_discarded_events
Closed

feat(component validation): validate component_discarded_events_total for sources#17981
neuronull wants to merge 4 commits intoneuronull/draft_component_validation_better_validationfrom
neuronull/component_validation_discarded_events

Conversation

@neuronull
Copy link
Contributor

addresses: #16842

The note in #16935 , about it being challenging to validate this metric, is true in general. That comment was specific to validating it for sources, where the events are more or less only droppable when the stream closes unexpectedly on us. Which I have no idea right now how to trigger deterministically.

Validating that with sinks should hopefully be a little easier as we could fail encoding etc.

Also a note, the code changed in this PR is altered significantly in #17980 ... posting this draft PR is mostly a tracking mechanism at this point.

@neuronull neuronull self-assigned this Jul 14, 2023
@datadog-vectordotdev
Copy link

Datadog Report

Branch report: neuronull/component_validation_discarded_events
Commit report: d74bf87

vector: 0 Failed, 0 New Flaky, 1920 Passed, 0 Skipped, 1m 20.26s Wall Time

@neuronull neuronull marked this pull request as ready for review July 18, 2023 18:34
telemetry_events: &[Event],
runner_metrics: &RunnerMetrics,
) -> Result<Vec<String>, Vec<String>> {
let expected_dropped = runner_metrics.discarded_events_total;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note- the expected value is not currently being set.

This is a rather tricky one to validate since it requires forcing the stream to close, after we sent the events to the source and before it sent them to the downstream.

@neuronull neuronull requested a review from tobz July 19, 2023 16:22
@neuronull
Copy link
Contributor Author

Because the code changed so much in #17980 , and this PR is so small, I will just close and re-implement it there.

@neuronull neuronull closed this Jul 19, 2023
@pront pront deleted the neuronull/component_validation_discarded_events branch March 27, 2025 15:19
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