[rollout-trace] Add x-codex-inference-call-id header to inference calls.#22311
Conversation
This allows us to attach call logs to inference requests in traces.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4203f62651
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
jif-oai
left a comment
There was a problem hiding this comment.
I'll let you take care of ws
| fn next_inference_call_id() -> InferenceCallId { | ||
| let ordinal = NEXT_INFERENCE_ATTEMPT.fetch_add(1, Ordering::Relaxed); | ||
| format!("inference:{ordinal}") | ||
| Uuid::new_v4().to_string() |
There was a problem hiding this comment.
FYI uuid can sometimes panic on some unusual OS that does not support getrandom at kernel level. I don't expect this to happen for any of our application but good to keep in mind if we go in some funky training setup
There was a problem hiding this comment.
Thanks. Let's assume it isn't an issue until we run into it.
This allows us to attach call logs to inference requests in traces.