feat: add COLO field to access log tracking
Add Cloudflare COLO data to the access log tracking system to capture datacenter location information. This enables better monitoring of request distribution across Cloudflare's global infrastructure. The COLO field is mapped to blob16 in the blobs map and populated from the Cloudflare request headers.
This commit is contained in:
parent
dc23ff02a2
commit
507a4d9a23
1 changed files with 2 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ export const blobsMap = {
|
|||
blob13: 'browserType',
|
||||
blob14: 'device',
|
||||
blob15: 'deviceType',
|
||||
blob16: 'COLO',
|
||||
} as const
|
||||
|
||||
export const doublesMap = {
|
||||
|
|
@ -140,6 +141,7 @@ export function useAccessLog(event: H3Event) {
|
|||
browserType: uaInfo?.browser?.type,
|
||||
device: uaInfo?.device?.model,
|
||||
deviceType: uaInfo?.device?.type,
|
||||
COLO: cf?.colo,
|
||||
|
||||
// For RealTime Globe
|
||||
latitude: Number(cf?.latitude || getHeader(event, 'cf-iplatitude') || 0),
|
||||
|
|
|
|||
Loading…
Reference in a new issue