freak82 opened a new issue, #11349:
URL: https://github.com/apache/trafficserver/issues/11349

   Hi there,
   
   I'm developing an ATS plugin for our company.
   
   According to [this 
page](https://docs.trafficserver.apache.org/en/latest/developer-guide/api/functions/TSStat.en.html),
 I should use the new APIs from `Metrics.h`. Correct me if I misunderstood the 
Note.
   
   I glanced over the functionality in the `Metrics.h` and checked its usage 
inside the ATS core. I think, I understood how to use it.
   ```
   // define the counter
   ts::Metrics::Counter::AtomicType *counter_name;
   ...
   // create/register the counter
   counter_name = ts::Metrics::Counter::createPtr("the-name-of-the-counter");
   ...
   // use the counter
   ts::Metrics::Counter::increment(counter_name);
   ```
   
   However, I'm wondering about the future binary compatibility. 
   So far, all of the other APIs are C functions and opaque types/pointers to 
hide the actual implementation.
   However, this new functionality exposes lots of implementation details in 
the header file along with the `Metrics` data member.
   Now if I use this functionality and for example:
   - my plugin is built against ATS version 10
   - ATS version 12 introduces some changes in the `Metrics` functionality 
which change the implementation of some of the inline functions and/or the data 
members of `Metrics`.
   It seems to me, that In the above scenario the plugin may experience some UB 
(Undefined Behavior) effects if run along ATS version 12.
   
   Did I misunderstood something? 
   Or there is no guarantee for binary compatibility between the ATS versions 
and I should always rebuild the plugins against the currently used ATS version?


-- 
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