Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(spans): Add event. getters for Span #3577

Merged
merged 2 commits into from
May 13, 2024

Conversation

iambriccardo
Copy link
Member

@iambriccardo iambriccardo commented May 10, 2024

This PR adds additional fields to the Span Getter implementation with the same path as the Event fields. The rationale behind this is to allow backward compatibility of rules that work on events, to now work on spans.

Close: #3551

@iambriccardo iambriccardo marked this pull request as ready for review May 10, 2024 11:05
@iambriccardo iambriccardo requested a review from a team as a code owner May 10, 2024 11:05
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

LGTM, see nitpick

Comment on lines +114 to +116
let span_prefix = path.strip_prefix("span.");
if let Some(span_prefix) = span_prefix {
return Some(match span_prefix {
Copy link
Member

Choose a reason for hiding this comment

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

match path.split_once('.') {
    Some(("span", remainder)) => { /* ... */ },
    Some(("event", remainder)) => { /* ... */ },
    _ => return None
}

@iambriccardo iambriccardo merged commit d12c96e into master May 13, 2024
23 checks passed
@iambriccardo iambriccardo deleted the riccardo/feat/event-getter-spans branch May 13, 2024 06:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants