Skip to content

ref(normalization): Remove duplicated normalization#3355

Merged
iker-barriocanal merged 2 commits intomasterfrom
iker/ref/dedup-norm
Mar 28, 2024
Merged

ref(normalization): Remove duplicated normalization#3355
iker-barriocanal merged 2 commits intomasterfrom
iker/ref/dedup-norm

Conversation

@iker-barriocanal
Copy link
Copy Markdown
Contributor

When light normalization was introduced, the normalization of platform and level was duplicated from the store normalization. Now that there's a single normalization step, this PR removes that duplication.

#skip-changelog

@iker-barriocanal iker-barriocanal self-assigned this Mar 28, 2024
@iker-barriocanal iker-barriocanal requested a review from a team as a code owner March 28, 2024 10:39
}

/// Defaults the `platform` and `level` required attributes.
fn normalize_platform_and_level(event: &mut Event) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These are normalized in

event.platform.get_or_insert_with(|| "other".to_string());
event.logger.get_or_insert_with(String::new);
event.extra.get_or_insert_with(Object::new);
event.level.get_or_insert_with(|| match event_type {

Comment on lines +1525 to +1528
"type": "error",
"exception": {
"values": [{"type": "ValueError", "value": "Should not happen"}]
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

type is not enough for an event to be considered an error, see

fn infer_event_type(event: &Event) -> EventType {

@iker-barriocanal iker-barriocanal merged commit 0881a4a into master Mar 28, 2024
@iker-barriocanal iker-barriocanal deleted the iker/ref/dedup-norm branch March 28, 2024 15:53
jan-auer added a commit that referenced this pull request Apr 3, 2024
* master:
  feat(metric-stats): Report cardinality to metric stats (#3360)
  release: 0.8.56
  fix(perfscore): Adds span op tag to perf score totals (#3326)
  ref(profiles): Return retention_days as part of the Kafka message (#3362)
  ref(filter): Add GTmetrix to the list of web crawlers (#3363)
  fix: Fix kafka topic default (#3350)
  ref(normalization): Remove duplicated normalization (#3355)
  feat(feedback): Emit outcomes for user feedback events (#3026)
  feat(cardinality): Implement cardinality reporting (#3342)
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