Skip to content

Comments

DM-54211: Change event field names to use backend-specific prefix#236

Merged
stvoutsin merged 1 commit intomainfrom
tickets/DM-54211
Feb 20, 2026
Merged

DM-54211: Change event field names to use backend-specific prefix#236
stvoutsin merged 1 commit intomainfrom
tickets/DM-54211

Conversation

@stvoutsin
Copy link
Member

Based on team discussion we decided that we want each backend to submit an event with field names that include the backend prefix. In other words, bigquery_elapsed, qserv_elapsed instead of backend_elapsed

result.update(self.status.to_logging_context())
if self.status.collected_bytes:
result["backend_size"] = self.status.collected_bytes
match self.status.backend_type:
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 could also shorten this with an f-string, but felt this was more readable. Alternative would be:

backend_prefix = self.status.backend_type.lower()
result[f"{backend_prefix}_size"] = self.status.collected_bytes

Copy link
Member

Choose a reason for hiding this comment

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

I like the match better -- I agree that it's easier to read.

Copy link
Member

@rra rra left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks!

result.update(self.status.to_logging_context())
if self.status.collected_bytes:
result["backend_size"] = self.status.collected_bytes
match self.status.backend_type:
Copy link
Member

Choose a reason for hiding this comment

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

I like the match better -- I agree that it's easier to read.

@stvoutsin stvoutsin merged commit 4270874 into main Feb 20, 2026
5 checks passed
@stvoutsin stvoutsin deleted the tickets/DM-54211 branch February 20, 2026 18:40
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