-
Notifications
You must be signed in to change notification settings - Fork 140
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
Conversation
@@ -32,6 +35,7 @@ export async function queryWorkersObservability( | |||
method: 'POST', | |||
headers: { | |||
'Content-Type': 'application/json', | |||
'workers-observability-origin': `workers-observability-mcp-${environment}`, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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!
…cloudflare/mcp-server-cloudflare into thomas/fix/response-token-usage
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 :)
No description provided.