Hey rustaceans, I need to plug my #axum server which uses the tracing crate for logs to our elasticsearch logging service, which uses ESC I believe?
It seems there's no off the shelf tracing_layer to talk to elasticsearch , and trying to write my own I'm running in the issue of needing to use an async method to send the message from a sync context (on_event() of tracing::Layer). Anything I've missed to make my live easier? #rustlang #tokio #elasticsearch

@corpsmoderne i have elasticsearch at $WORK and admin it. APM is purely to capture performance data. Not needed for logging at all. Simplest and most robust way to get logs to es is. Use filebeat. On kubernetes you can emit any JSON log lines to stdout and have filebeat consume and sent it. Filebeat deals with es being offline and other edge cases. In many cases when our elastic server had a hickup all our apps died. So filebeat is heartly recomended.

Yeah now I've a purely #elasticsearch #esc issue, When I try to send a new event the call fails with a 500 and cryptic error, and google is not helpful...

STATUS: 500, BODY: {
"error": {
"reason": "[_data_stream_timestamp] meta field has been disabled",
"root_cause": [
{
"reason": "[_data_stream_timestamp] meta field has been disabled",
"type": "illegal_state_exception"
}
],
"type": "illegal_state_exception"
},
"status": 500
}