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

Add an identifier ID to remap rules, and corresponding log tag and plugin APIs


    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 7.2.0
    • Component/s: Logging, Remap API
    • Labels:


      It would be useful to be able to have an identifier (not necessarily unique) in remap rules. Something like e.g.

      map http://example.com http://a.example.com @id="Rule 1"

      Where the ID can be any freeform string up to say 32 characters (fixed size for efficient APIs). In addition, we would also add a new log tag, RID or some such, which can be used in custom log formats.

      Finally, since not all remapping happens through remap.config, we'd want to add two new APIs as well (this is where the fixed size string comes to play, to avoid allocations):

      const char* TSRemapIdentifierGet();


      TSReturnCode TSRemapIdentifierSet(const char* str);

      The string is guaranteed to be NULL terminated (for the Get()'er to be safe and easy to use).

      Question: Does it makes sense to instead use a (char*, int) to pass along ? I think not personally, and we have precedence in both (in marshaled buffers, this makes more sense).


          Issue Links



              • Assignee:
                jrushford John Rushford
                zwoop Leif Hedstrom
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: