always use x-amzn-trace-id even if not ulid
This commit is contained in:
parent
515d0af751
commit
9ea712dfd0
@ -404,19 +404,12 @@ impl ValidatedRequest {
|
||||
) -> Web3ProxyResult<Arc<Self>> {
|
||||
#[cfg(feature = "rdkafka")]
|
||||
let kafka_debug_logger = if matches!(authorization.checks.proxy_mode, ProxyMode::Debug) {
|
||||
let request_ulid = request_id
|
||||
.map(|s| Ulid::from_string(&s))
|
||||
.transpose()
|
||||
.ok()
|
||||
.flatten()
|
||||
.unwrap_or_else(Ulid::new);
|
||||
|
||||
KafkaDebugLogger::try_new(
|
||||
app,
|
||||
authorization.clone(),
|
||||
head_block.as_ref().map(|x| x.number()),
|
||||
"web3_proxy:rpc",
|
||||
request_ulid,
|
||||
&request_id,
|
||||
)
|
||||
} else {
|
||||
None
|
||||
|
@ -37,7 +37,7 @@ impl KafkaDebugLogger {
|
||||
authorization: Arc<Authorization>,
|
||||
head_block_num: Option<U64>,
|
||||
kafka_topic: &str,
|
||||
request_ulid: Ulid,
|
||||
request_id: &str,
|
||||
) -> Option<Arc<Self>> {
|
||||
let kafka_producer = app.kafka_producer.clone()?;
|
||||
|
||||
@ -74,7 +74,7 @@ impl KafkaDebugLogger {
|
||||
})
|
||||
.insert(KafkaHeader {
|
||||
key: "request_ulid",
|
||||
value: Some(&request_ulid.to_string()),
|
||||
value: Some(request_id),
|
||||
})
|
||||
.insert(KafkaHeader {
|
||||
key: "head_block_num",
|
||||
|
Loading…
Reference in New Issue
Block a user