Skip to content
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

REPL should tell users whether metrics, tracing, etc. are turned on/off #750

Closed
tsandall opened this issue May 21, 2018 · 8 comments
Closed

Comments

@tsandall
Copy link
Member

Currently the REPL allows users to turn on/off features like metrics, tracing, etc. Users can toggle these but they can't tell whether the features are on off.

It would be nice if users could check which features are enabled.

@BenderScript
Copy link
Contributor

Should we add a new command such as "show debug"?

@tsandall
Copy link
Member Author

Sure, that sounds reasonable. What I would probably do is create a settings struct that can be serialized into JSON and printed to the console. Feel free to follow that approach or not (it seems like it'll be easy to keep the settings in-sync w/ the show debug command that way.)

@BenderScript
Copy link
Contributor

BenderScript commented Oct 27, 2018

`> show debug
{
"Trace": false,
"Metrics": false,
"Instrument": false
}

`

@tsandall
Copy link
Member Author

Cool. We typically add struct field tags and make the fields follow snake_case. E.g., the output should be:

{
  "trace": false,
  "metrics": false,
  "instrument": false
}

@BenderScript
Copy link
Contributor

It is snake case but Github is not formatting properly. But struct field tags are there, do you want me to make them lower case?

@tsandall
Copy link
Member Author

tsandall commented Oct 28, 2018

Yes, the struct should look like this (modulo gofmt):

type Foo struct {
  A int `json:"a"`
  SomeField int `json:"some_field"`
}

@BenderScript
Copy link
Contributor

sure, will do.

@BenderScript
Copy link
Contributor

> show debug
{
	"trace": false,
	"metrics": false,
	"instrument": false
}
>

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

No branches or pull requests

2 participants