Build on top of the current setup for distributed tracing.
This should include the following spans:
| Span Name | File | Method | Key Attributes | Purpose |
|---|---|---|---|---|
| createServerForRequest | remoteMcpRunner.ts | createServerForRequest() | auth.token_present | Root span for every inbound MCP request; all other spans nest under it |
| mmsApiClient.getMeshAddresses | mmsApiClient.ts | getMeshAddresses() | projectId | Tracks latency/errors fetching cluster mesh addresses from MMS |
| mmsApiClient.getX509 | mmsApiClient.ts | getX509() | projectId | Tracks latency/errors fetching X509 certs from MMS |
| mmsApiClient.makeRequest | mmsApiClient.ts | makeRequest() | http.method, http.url, http.status_code | Track calls to MMS backend |
| serviceAuth.fetchToken | serviceAuthProvider.ts | startFetchToken() | auth.endpoint | Tracks OAuth2 client_credentials token exchange latency with AuthN |
| remoteAtlasConnect.execute | remoteAtlasConnectTool.ts | execute() | projectId, clusterName | Full connect flow: mesh addresses + x509 + MongoDB driver connection |