Adds methods for setting TagMap.Entry directly on AgentSpan/DDSpan by dougqh · Pull Request #10472 · DataDog/dd-trace-java
added 16 commits
January 12, 2026 14:33Fixed bug TagValueConversions.toBoolean Could cause LegacyTagMap.EntryReader to produce incorrect answers to some queries For simplicity, now treating Byte and Short as Integer. That will make calling code doing primitive handling simpler. Fleshing out tests -- more tests to come
Adding methods to AgentSpan / DDSpan that take TagMap.Entry/Reader objects directly This will enable TagMap.Entry reuse which can reduce memory allocation/GC pressure
Methods are intended to be used to create TagMap.Entry objects for repeatedly used values Overloads are provided for all the supported types to be easier for developers not familiar with TagMap internals. Internally, TagMap still uses the more explicit new<X>Entry methods.
This was referenced
Feb 2, 2026- setMetric not guards against null - TagMap.create now allows null - and returns null in response The intention is to let null values benignly flow through TagMap.Entry.create into AgentSpan.setTag / setMetric
dougqh
deleted the
dougqh/fdirect-apis-for-tagmap-entry
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters