-
Notifications
You must be signed in to change notification settings - Fork 101
feat: add -debug flag to allow debugging of Grafana requests #97
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
Should resolve #80.
@@ -135,6 +155,8 @@ var ExtractGrafanaClientFromEnv server.StdioContextFunc = func(ctx context.Conte | |||
cfg.APIKey = apiKey | |||
} | |||
|
|||
cfg.Debug = GrafanaDebugFromContext(ctx) |
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.
should we pass all config options through env vars? wondering if using one way or the other will make it maintainable over time
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.
Yeah I do think we need to standardize here, and maybe revisit all of the config options to be honest. Ideally everything would be configurable via either env or CLI flag which we could get by using a more full featured CLI parsing library, but that feels like a future thing!
I chose a CLI flag because it feels similar to --log-level
to me!
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.
🤔 I am not seeing much different in the logs when trying with Claude Desktop. Is there something I should be looking for?
When I run the server with
I haven't tried with Claude desktop to be fair, not sure where it dumps the logs... |
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.
Well I see them today so maybe I just did something odd with the build yesterday... 🤷
I'm good with the cli argument, it actually looks like grafana-runtime uses the DEBUG env var, but then overwrites it when creating the client. We could use that too in the future.
Should resolve #80.