Superskyyy commented on PR #10884:
URL: https://github.com/apache/skywalking/pull/10884#issuecomment-1579484822

   A special case may require a change of how patternnames are stored in a rule.
   
   When we first see a URI in batch001: users/**helloworldguy**/post/**234**
   
   Then second uri in batch001: users/**helloworldguy**/post/**356**
   
   We as human may know both highlighted names are variables, but its 
impoosible for a algorithm to tell at first sight that "helloworldguy" is 
actually a variable not a static endpoint path, it can only tell when seeing 
more examples. (for example, seeing more than 10 differnt string combinations 
at this exact path location)
   
   So, if unluckily only this particular user called the endpoint during the 
interval. the Pattern will become users/helloworldguy/post/{int} after the 
first batch is analyzed.
   
   then in sometime in the future it arrives one called 
users/**anotheruser**/post/**759**, it won't be matched as the previous pattern 
since the user changed. 
   
   > Solution is that only store a reference ID to endpoint names instead of 
the actual string, when rendering it we get it dynamically from a table, when 
remote ai services needs to extend the uri pattern (from one param to 
multiple), it can freely change it without having to modify every record. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to