Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-600

API: New stats api for plugins

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • Docs
    • Documentation, TS API
    • None

    Description

      We added new Stats APIs in the v2.x release lines, and I'm making a small change to keep this new API in line with another change made to the SDK. So, the new APIs available for creating / manipulating stats are:

      tsapi int TSStatCreate(const char *the_name, TSRecordDataType the_type, TSStatPersistence persist, TSStatSync sync);
      tsapi TSReturnCode TSStatIntIncrement(int the_stat, TSMgmtInt amount);
      tsapi TSReturnCode TSStatIntDecrement(int the_stat, TSMgmtInt amount);
      tsapi TSReturnCode TSStatIntSet(int the_stat, TSMgmtInt value);
      tsapi int TSStatFindName(const char* name);

      The one notable change here, from previous implementation, is the name change of the "type" data type. It is now TSRecordDataType, which is used in another new API, and it makes perfect sense to reuse / merge these into one data type instead of two.

      Attachments

        Issue Links

          Activity

            People

              jsime Jon Sime
              zwoop Leif Hedstrom
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: