Log Metrics Extraction with a contains clause

DQL matcher in logs - Dynatrace Docs

Why can I not, according to the documentation, use:

log.source = “mytest” and matchesPhrase(content, “Some text”) to create a log metric from a log file.

I get a LWL Validation error: first invalid character at the (

I think you should use the ==

can you please try changing

log.source == “mytest” and matchesPhrase(content, “Some text”)

It wasn’t happy about that.    Complaining about the 2nd = symbol.

I note the document is for DQL.  But in the error, this is complaining about LQL.  Are these different?

This is from the Creation of a log metric page under log monitoring.  On a managed instance (with no grail).  The documentation does not have many references for LQL.

I tried to do something similar and it does not throw a error in SaaS.

Looking at the managed docs , the procedure seems bit different if you are not on grail. Not sure if that’s causing the issue here in managed

https://docs.dynatrace.com/managed/observe-and-explore/log-monitoring/analyze-log-data/log-metrics

As Phani mentioned there are some pretty big differences between managed and SaaS. In managed there is no DQL or Grail and there is different documentation available. docs.dynatrace.com is for SaaS whereas docs.dyntrace.com/managed/ is for managed. For the query syntax you can find that here https://docs.dynatrace.com/managed/observe-and-explore/log-monitoring/analyze-log-data/log-viewer#sql

If a UI element in managed took you to the wrong docs it would be good to raise this with support so that it can be rectified.