@@ -25,7 +25,7 @@ describe('vercel log drain template', () => {
2525 expect ( response . finished ) . toEqual ( true )
2626 expect ( response . capturedPostHogEvents ) . toHaveLength ( 1 )
2727 expect ( response . capturedPostHogEvents [ 0 ] . event ) . toEqual ( '$http_log' )
28- expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ a - f 0 - 9 ] { 64 } $ / )
28+ expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ A - Z a - z 0 - 9 + / ] { 22 } $ / )
2929 expect ( response . capturedPostHogEvents [ 0 ] . properties ) . toMatchObject ( {
3030 source : 'lambda' ,
3131 level : 'info' ,
@@ -218,7 +218,7 @@ describe('vercel log drain template', () => {
218218 )
219219
220220 expect ( response . error ) . toBeUndefined ( )
221- expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ a - f 0 - 9 ] { 64 } $ / )
221+ expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ A - Z a - z 0 - 9 + / ] { 22 } $ / )
222222 } )
223223
224224 it ( 'should capture all Vercel log properties with snake_case naming' , async ( ) => {
@@ -306,7 +306,7 @@ describe('vercel log drain template', () => {
306306
307307 expect ( response . error ) . toBeUndefined ( )
308308 expect ( response . capturedPostHogEvents ) . toHaveLength ( 1 )
309- expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ a - f 0 - 9 ] { 64 } $ / )
309+ expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ A - Z a - z 0 - 9 + / ] { 22 } $ / )
310310 // Proxy fields should be null when proxy is missing
311311 expect ( response . capturedPostHogEvents [ 0 ] . properties . proxy_method ) . toBeNull ( )
312312 } )
@@ -549,7 +549,7 @@ describe('vercel log drain template', () => {
549549 const id1Repeat = day1Repeat . capturedPostHogEvents [ 0 ] . distinct_id
550550 const id2 = day2 . capturedPostHogEvents [ 0 ] . distinct_id
551551
552- expect ( id1 ) . toMatch ( / ^ h t t p _ l o g _ [ a - f 0 - 9 ] { 64 } $ / )
552+ expect ( id1 ) . toMatch ( / ^ h t t p _ l o g _ [ A - Z a - z 0 - 9 + / ] { 22 } $ / )
553553 expect ( id1Repeat ) . toBe ( id1 )
554554 expect ( id2 ) . not . toBe ( id1 )
555555 expect ( day1 . capturedPostHogEvents [ 0 ] . properties . $distinct_id_strategy ) . toBe ( 'rotating_salt' )
@@ -585,7 +585,7 @@ describe('vercel log drain template', () => {
585585 { request : createVercelRequest ( vercelLogDrain ) }
586586 )
587587
588- expect ( day1 . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ a - f 0 - 9 ] { 64 } $ / )
588+ expect ( day1 . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ A - Z a - z 0 - 9 + / ] { 22 } $ / )
589589 expect ( day2 . capturedPostHogEvents [ 0 ] . distinct_id ) . toBe ( day1 . capturedPostHogEvents [ 0 ] . distinct_id )
590590 expect ( rotated . capturedPostHogEvents [ 0 ] . distinct_id ) . not . toBe ( day1 . capturedPostHogEvents [ 0 ] . distinct_id )
591591 expect ( day1 . capturedPostHogEvents [ 0 ] . properties . $distinct_id_strategy ) . toBe ( 'fixed_salt' )
@@ -641,7 +641,7 @@ describe('vercel log drain template', () => {
641641 )
642642
643643 expect ( response . error ) . toBeUndefined ( )
644- expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ a - f 0 - 9 ] { 64 } $ / )
644+ expect ( response . capturedPostHogEvents [ 0 ] . distinct_id ) . toMatch ( / ^ h t t p _ l o g _ [ A - Z a - z 0 - 9 + / ] { 22 } $ / )
645645 expect ( response . capturedPostHogEvents [ 0 ] . properties . $distinct_id_strategy ) . toBe ( 'rotating_salt_fallback' )
646646 expect ( response . logs . map ( ( l ) => l . message ) ) . toContainEqual (
647647 expect . stringContaining ( 'custom_template empty, falling back' )
0 commit comments