building-resilient-microservices / observability

A microservice observability (Logs, Metrics and Traces) example
2 stars 2 forks source link

Kafka messages with 1970 timestamp #16

Open wanderleisouza opened 10 months ago

wanderleisouza commented 10 months ago

Offset: 97 Key: �� Timestamp: 1970-01-20 16:42:51.066 Headers: TypeId: com.example.messaging.model.FactDTO, traceparent: 00-8cc28e86d15038c5e24e3eee1c5ff724-3b47241daf6eaf47-01

log:

2023-12-05T07:11:07.004-03:00 INFO 89286 --- [kafka-producer-demo] [ad | producer-1] [ ] com.example.messaging.service.Producer : Producer sent message with traceId=8cc28e86d15038c5e24e3eee1c5ff724 and timestamp=1701771066, record=FactDTO[id=40112, fact=Chuck Norris doesn't need the cloud to scale his applications, he uses his laptop.]

wanderleisouza commented 10 months ago

It was an epochtime precision issue; now I think is a question of timezone

Offset: 0 Key: � Timestamp: 2023-12-06 21:46:54.000 Headers: TypeId: com.example.messaging.model.FactDTO, traceparent: 00-ac3c6d1d75e2d2c4b327f932abf334a1-119a06f89c812abc-01

{"id":919264,"fact":"Chuck Norris doesn't need the cloud to scale his applications, he uses his laptop."}