Created
December 15, 2023 00:09
-
-
Save MichaelDrogalis/197c432d9965ee0de53a3bd724304574 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"generators": [ | |
{ | |
"topic": "funnelEvents", | |
"fork": { | |
"key": { | |
"_gen": "string", | |
"expr": "#{Name.username}" | |
}, | |
"stagger": { "ms": 200 } | |
}, | |
"key": { "_gen": "var", "var": "forkKey" }, | |
"value": {}, | |
"stateMachine": { | |
"_gen": "stateMachine", | |
"initial": "viewLandingPage", | |
"transitions": { | |
"viewLandingPage": "addItemToCart", | |
"addItemToCart": { | |
"_gen": "oneOf", | |
"choices": [ | |
"viewCart", | |
"addItemToCart" | |
] | |
}, | |
"viewCart": "checkout" | |
}, | |
"states": { | |
"viewLandingPage": { | |
"value": { | |
"stageName": "landingPage", | |
"referrer": { | |
"_gen": "string", | |
"expr": "#{Internet.url}" | |
} | |
} | |
}, | |
"addItemToCart": { | |
"value": { | |
"stageName": "addItem", | |
"item": { | |
"_gen": "string", | |
"expr": "#{Commerce.productName}" | |
} | |
} | |
}, | |
"viewCart": { | |
"value": { | |
"stageName": "checkCart", | |
"timestamp": { | |
"_gen": "now" | |
} | |
} | |
}, | |
"checkout": { | |
"value": { | |
"stageName": "purchase", | |
"price": { | |
"_gen": "uniformDistribution", | |
"bounds": [ | |
1, | |
100 | |
] | |
} | |
} | |
} | |
} | |
}, | |
"localConfigs": { | |
"throttle": { "ms": 800 } | |
} | |
} | |
], | |
"connections": { | |
"dev-kafka": { | |
"kind": "kafka", | |
"producerConfigs": { | |
"bootstrap.servers": "localhost:9092", | |
"key.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer", | |
"value.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment