Skip to content

Conversation

@swcollard
Copy link
Contributor

@swcollard swcollard commented Sep 22, 2025

We were missing traces for the MCP server generating Tools from Operations and performing authorization. This PR also add the HTTP status code to the top level HTTP trace

Trace Missing OAuth Token
Screenshot 2025-09-22 at 10 48 48 AM

Operation traces
Screenshot 2025-09-22 at 1 24 17 PM
Screenshot 2025-09-22 at 1 24 23 PM
Screenshot 2025-09-22 at 1 24 34 PM

@swcollard swcollard requested a review from a team as a code owner September 22, 2025 16:00
@apollo-librarian
Copy link

apollo-librarian bot commented Sep 22, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* (developer-tools)/apollo-mcp-server/(latest)/config-file.mdx

Build ID: cd8271762213def9d3dbf916
Build Logs: View logs

URL: https://www.apollographql.com/docs/deploy-preview/cd8271762213def9d3dbf916

@github-actions
Copy link

Changeset file missing for PR

All changes should include an associated changeset file.
Please refer to README for more information on generating changesets.

Copy link
Contributor

@DaleSeo DaleSeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have minor suggestions and questions. Overall, this looks solid to me!

http::{Request, StatusCode},
};
use http::header::{AUTHORIZATION, WWW_AUTHENTICATE};
use tower::ServiceExt; // for .oneshot()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! 👍

use super::*;

#[tokio::test]
async fn start_basic_server() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

impl OperationSource {
#[tracing::instrument]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this include self?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so it will log either the files like in this example.

Screenshot 2025-09-23 at 9 05 07 AM

Or it will log whether the operation is generated from persisted queries or operation collections.

self is not the best name though.. I am going to rename it

@swcollard swcollard merged commit f7318da into feature/telemetry Sep 23, 2025
11 checks passed
@swcollard swcollard deleted the telemetry/operations-trace-metrics branch September 23, 2025 15:37
@apollo-bot2 apollo-bot2 mentioned this pull request Sep 24, 2025
@DaleSeo DaleSeo mentioned this pull request Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants