[SERVER-33394] I wish MongoDB to add some relevant USDT (User-level Statically Defined Tracing) tracepoints which are helpful with eBPF Created: 20/Feb/18  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Ricardo Lorenzo Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 2
Labels: sa-remove-fv-backlog-22
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-35145 Query/Write USDT (User-level Statical... Backlog
Assigned Teams:
Service Arch
Participants:

 Description   

A USDT (User-level Statically Defined Tracing) probe is a marker where developers add tracing macros to their code at interesting locations, with a stable and documented API. It makes tracing a lot easier. You can find an example of how to add these probes in this site.


Having USDT facilitates the tracing , for example, instead of tracing _ZN5mongo7Explain13explainStagesEPNS_12PlanExecutorEPKNS_10CollectionENS_13ExplainCommon9VerbosityEPNS_14BSONObjBuilderE you could just simply trace an hypothetical probe called mongodb:query_explain_start.

This is particularly relevant for User-Level Dynamic Tracing.

Static tracepoints have existed for a long time, although it was recently more popular due to Sun's DTrace utility which helps in the introduction of these tracepoints in common applications, including MySQL, PostgreSQL, Node.js and Java.

These points will greatly help with the problem diagnosis. Some suggested statically defined tracepoints would be:

  • Query related (query parse start/done, query exec start/done, index read start/done, cache hit, cache miss, in memory sorts, etc)
  • Lock related (lock taken and release, etc)
  • Network (connection received, connection created, connection closed, etc)

This feature would be helpful when using eBPF filters.



 Comments   
Comment by Ger Hartnett [ 16/Apr/18 ]

ricardo.lorenzo please add eBPF to the title/description

Generated at Thu Feb 08 04:33:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.