Repository navigation
Commit 75ec723
Make TagMap a facade over an id store and a name store
TagMap keeps known tags in an IdStore (by id) and custom tags in a
HashStore (by name), instead of one bucket array. A name is classified
once, at the boundary, and routed to its store; known and custom tags
never share a key, so read-through and precedence work per store and
never cross between them. The name store is created on the first custom
write; until then a map borrows its read-through parent's store
read-only.
Behavior is unchanged: the TagMap suites pass as they are, and Entry
objects are still shared across copies. The span still holds a single
TagMap; it starts owning the stores directly in the next change.
TagMap.Internals stays for now, writing straight to the id store, and
goes away with that change.
Reads by id go straight to the id store. stream() and spliterator()
yield stable Entries, and getEntryReader gives a momentary reader for
typed reads. TagStoresTest covers the stores through TagMap, and
IdStoreContractTest gains the view cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent ec6ec40 commit 75ec723
8 files changed
Lines changed: 1012 additions & 834 deletions
File tree
- gradle/forbiddenApiFilters
- internal-api/src
- main/java/datadog/trace/api
- test/java/datadog/trace/api
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
41 | 49 | | |
42 | 50 | | |
43 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | 417 | | |
436 | 418 | | |
437 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
0 commit comments