Skip to content
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

[Logs] Add timestamp field to log envelope item #4553

Closed
AbhiPrasad opened this issue Mar 5, 2025 · 1 comment
Closed

[Logs] Add timestamp field to log envelope item #4553

AbhiPrasad opened this issue Mar 5, 2025 · 1 comment
Assignees

Comments

@AbhiPrasad
Copy link
Member

https://github.com/getsentry/relay/blob/master/relay-server/src/services/processor/ourlog.rs#L53-L71

Need to update otel_to_sentry_log
https://github.com/getsentry/relay/blob/master/relay-ourlogs/src/ourlog.rs#L8

and adjust OurLog (with timestamp not in nanos) to LogKafkaMessage (has to be in nanos)

let mut log: LogKafkaMessage = match serde_path_to_error::deserialize(d) {
Ok(log) => log,
Err(error) => {
relay_log::error!(
error = &error as &dyn std::error::Error,
"failed to parse log"
);
self.outcome_aggregator.send(TrackOutcome {
category: DataCategory::LogItem,
event_id: None,
outcome: Outcome::Invalid(DiscardReason::InvalidLog),
quantity: 1,
remote_addr: None,
scoping,
timestamp: received_at,
});
self.outcome_aggregator.send(TrackOutcome {
category: DataCategory::LogByte,
event_id: None,
outcome: Outcome::Invalid(DiscardReason::InvalidLog),
quantity: payload.len() as u32,
remote_addr: None,
scoping,
timestamp: received_at,
});
return Ok(());
}
};

@AbhiPrasad AbhiPrasad self-assigned this Mar 5, 2025
@AbhiPrasad AbhiPrasad changed the title [Relay] Add timestamp field to log envelope item [Logs] Add timestamp field to log envelope item Mar 5, 2025
@AbhiPrasad
Copy link
Member Author

Being taken care of in #4592, closing this as such.

@AbhiPrasad AbhiPrasad closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2025
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

No branches or pull requests

1 participant