Skip to main content
Sumo Logic

Comments in Metric Queries

You can add comments to metrics queries in Metric Explorer's Advanced Mode.

In the Metrics Explorer, in Advanced Mode you can add comments to a metrics query and comment out portions of the query by using comment formatting. 

Comments are helpful for troubleshooting during query development, and also for other users who may use or edit your queries at a later date—comments you add will be visible in saved and shared queries.

Comment characters Usage
// You can comment out part of a line or a complete line by prefacing it with two forward slashes.

Tip You can insert the comment characters with cmd / on macOS or ctrl / on Windows.
/*   */ You can comment out multiple lines by putting /* and */ before and after the lines.

When you comment out part of your metrics query, the commented text appears in gray italics. If the query is valid without the line that is commented out, it will execute when you run the query. 

Comments you add to a metrics query will appear on dashboards, monitors and SLO pages that use the metrics query.

In this example, a complete line is commented out. 


In this example, multiple lines are commented out.