Skip to content

Commit

Permalink
Add time to cloud event header for tracking time from knative fan out
Browse files Browse the repository at this point in the history
message generation to when the message is loaded by a knative serving
pod in prompt processing.  Time header requires string and is converted
back to float in prompt processing.
  • Loading branch information
dspeck1 committed Dec 3, 2024
1 parent 3ef17f9 commit 34507f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,11 @@ def dispatch_fanned_out_messages(client: httpx.AsyncClient,
Whether or not Knative requests can be retried.
"""
try:

attributes = {
"type": "com.example.kafka",
"source": topic,
"time": str(time.time())
}

for fan_out_message in send_info.fan_out_messages:
Expand Down

0 comments on commit 34507f0

Please sign in to comment.