Skip to content

[Question] OTel span spam #621

Description

@tvardero

I have found that FusionCache contributes ~50% of all telemetry spans in the project. Overall spans with op get or set cache are more common than even db calls.

We don't use cache that much, but it already has large impact on the application. We have one cache call for authorization check (on every endpoint), but other than that, we rarely cache anything else in application.

Image

Investigating further I see that one GetOrSet operation generates 7 different span (1 parent and 6 child), depending on how many tags were specified for the cache entry. Having more tags generates more spans.

All child spans differentiate only in fusioncache.operation.key attribute:
Image

We are using self-hosted Sentry and large amount of spans makes an impact on our storage. We are already on 0.5 sample rate, but looks like we need to go even lower, which will degrade developer experience / debugging.

Workaround from our side could be:

  • reducing amount of tags on cache entries
  • reducing sample rate for traces
  • disabling OTel integration for FusionCache
  • keep increasing storage everyday

Questions I have to you are:

  • can those spans be merged together into one, and attribute fusioncache.operation.key be changed type to array?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions