Skip to content

Add kafka data logging#36

Merged
zhouzhuojie merged 1 commit into
masterfrom
zz/data-logging
Oct 17, 2017
Merged

Add kafka data logging#36
zhouzhuojie merged 1 commit into
masterfrom
zz/data-logging

Conversation

@zhouzhuojie
Copy link
Copy Markdown
Collaborator

Add async kafka data logging.

tested with kt consume.

curl --request POST \
  --url http://localhost:18000/api/v1/evaluation \
  --header 'content-type: application/json' \
  --data '{\n	"entityID": "123",\n	"entityType": "report",\n	"entityContext": {\n		"dl_state": "NY",\n		"doc_state": "NY"\n	},\n	"flagID": 2,\n	"enableDebug": true\n}'

produces

{
  "partition": 0,
  "offset": 14,
  "key": "123",
  "value": "{\"evalContext\":{\"enableDebug\":true,\"entityContext\":{\"dl_state\":\"NY\",\"doc_state\":\"NY\"},\"entityID\":\"123\",\"entityType\":\"report\",\"flagID\":2},\"evalDebugLog\":{\"segmentDebugLogs\":[{\"msg\":\"constraint not match. constraint: dl_state == \\\"CA\\\", entity_context: map[dl_state:NY doc_state:NY].\",\"segmentID\":2},{\"msg\":\"matched all constraints. rollout yes. {BucketNum:94 DistributionArray:{VariantIDs:[3 4] PercentsAccumulated:[300 1000]} VariantID:3 RolloutPercent:50}\",\"segmentID\":3}]},\"flagID\":2,\"segmentID\":3,\"timestamp\":\"2017-10-16T21:55:21Z\",\"variantID\":3}",
  "timestamp": "1969-12-31T15:59:59.999-08:00"
}

@zhouzhuojie zhouzhuojie merged commit 5edfc56 into master Oct 17, 2017
@zhouzhuojie zhouzhuojie deleted the zz/data-logging branch November 14, 2017 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants