Skip to content

Workers Observability migrate responses to TSV's #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 2, 2025

Conversation

Ankcorn
Copy link
Collaborator

@Ankcorn Ankcorn commented May 2, 2025

No description provided.

@@ -32,6 +35,7 @@ export async function queryWorkersObservability(
method: 'POST',
headers: {
'Content-Type': 'application/json',
'workers-observability-origin': `workers-observability-mcp-${environment}`,
Copy link
Member

@Maximo-Guk Maximo-Guk May 2, 2025

Choose a reason for hiding this comment

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

Maybe we can come up with a general header name, which every mcp server uses?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is specific to our backend, happy to add a general one too

Copy link
Member

@Maximo-Guk Maximo-Guk May 2, 2025

Choose a reason for hiding this comment

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

Awesome, maybe we can set our user agent to the server name / version ( the ones pulled from package.json )

Also doesn't have to be in this PR!

@@ -23,6 +25,8 @@ export async function queryWorkersObservability(
accountId: string,
query: QueryRunRequest
): Promise<z.infer<typeof zReturnedQueryRunResult> | null> {
// @ts-expect-error We don't have actual env in this package
const environment = env.ENVIRONMENT
Copy link
Member

Choose a reason for hiding this comment

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

We could probably also pass through this env in the params so we don't need to expect error here.

Kinda like what do here https://github.com/cloudflare/mcp-server-cloudflare/blob/main/packages/mcp-common/src/dev-mode.ts#L6

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will fix in a follow up on monday :)

@Ankcorn Ankcorn merged commit d58d128 into main May 2, 2025
5 of 6 checks passed
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.

2 participants