Fix the issue of duplicate traceId and spanId caused by RandomIdGenerator - #4377
Fix the issue of duplicate traceId and spanId caused by RandomIdGenerator#4377lyred193 wants to merge 4 commits into
Conversation
|
Could you please add an explanation on why this fixes things? |
In some scenarios, such as model performance evaluation, we prefer the split between training and testing data to be random. By setting a fixed random seed, we can ensure that each model uses the same dataset for training and validation, enabling fair comparisons. In this context, integrating OpenTelemetry can lead to the duplication of traceId and spanId if the application is restarted. Here’s a demo: In this demo, when accessing the /evaluation endpoint, the generated traceId is 164207228320579316746596838417247989971, and the spanId is 273610340023782072, with the span name being /evaluation. After restarting the application (due to an update or a manual restart), accessing the /health endpoint generates the same traceId 164207228320579316746596838417247989971 and spanId 273610340023782072. However, the span name has changed to /health, which is clearly incorrect. |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
|
This PR has been closed due to inactivity. Please reopen if you would like to continue working on it. |
Description
Fix the issue of duplicate traceId and spanId when the user sets the global random operator seed.
Fixes #4376
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
No.
Checklist: