Anal and circumanal glands
Read the draft explanation
The names matter here. Anal glands, circumanal glands and the glands in an anal sac are different structures.
Anal glands in dogs are tubuloalveolar glands that produce fatty secretions. Their secretory cells and ducts contain neutral glycoproteins with terminal sugars. The named sugar is α-L-fucose, rather than fructose. It may affect the mucus's viscoelastic properties: how it flows and holds its shape. This may help form a stable mucous coat around formed faeces. Histochemical work supports this as a proposed mechanism.
Circumanal glands lie in the subcutaneous tissues around the anus. My note calls them modified sebaceous glands. The book separates a superficial sebaceous portion from a deep, nonsebaceous portion. The deep part is not simply an ordinary oil-producing gland.
The source and textbook describe a zone extending up to 4 cm outward from the anus. An anatomical study described 3.5 cm in larger dogs. These are anatomical descriptions with variable extent, not a fixed boundary or a surgical margin.
The textbook pattern is continued growth of the deep portion throughout life in intact male dogs, with regression in adult female dogs.
Paranal sinus glands are a separate group in the walls of the anal sac and its duct.
References
Johnston & Tobias, 2nd ed., Ch94; Tsukise 2000; Maita & Ishida 1975.