Skip to content

fix(sinks): Add missing component span for sink building #17765

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

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/topology/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,16 @@ impl<'a> Builder<'a> {
let typetag = sink.inner.get_component_name();
let input_type = sink.inner.input().data_type();

let span = error_span!(
"sink",
component_kind = "sink",
component_id = %key.id(),
component_type = %sink.inner.get_component_name(),
// maintained for compatibility
component_name = %key.id(),
);
let _entered_span = span.enter();
Copy link
Contributor

Choose a reason for hiding this comment

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

We might also want to remove the creation of buffer_span below and replace its usage with Span::current(), so that we don't have a duplicated span.

Copy link
Member Author

@jszwedko jszwedko Jun 26, 2023

Choose a reason for hiding this comment

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

Good catch. I dropped the duplicate labels from the buffer span in 1bb3954. I verified it pulled the component labels from the newly introduced span.


// At this point, we've validated that all transforms are valid, including any
// transform that mutates the schema provided by their sources. We can now validate the
// schema expectations of each individual sink.
Expand Down