Skip to content

DQL generated by nl2dql is incorrect #284

@Dynatrace-Asad-Ali

Description

@Dynatrace-Asad-Ali

Describe the bug
When using the natural language to get more details about a specific problem, the generated DQL is incorrect. In the DQL, it is filtering the query on field event.problem_id. However, it should be filtering on display_id. When I run the DQL generated by nl2dql in the notebook, I don't get any data in my tenant. Upon further investigation, it appears that event.problem_id is not a field anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Use this nl to query all problems "List all open problems in my dynatrace env for the past one hour".
  2. From the list of problems shown in the output, ask this nl question "For problem , provide more details"
  3. The output I get is "There are no additional detailed records found for problem P-2512155 in the last 7 days based on the filtered problem ID in Dynatrace."

I am using Dynatrace prod tenant.

The query that is generated by nl2dql is:
fetch dt.davis.problems, from: now()-7d, to: now() | filter event.problemId == \"P-2512155\" | fields event.description, event.status, event.category, event.start, event.end, root_cause_entity_id, root_cause_entity_name, duration, affected_entities_count, event_count, affected_users_count, problem_id, dt.davis.mute.status, dt.davis.mute.user, entity_tags, labels.alerting_profile, maintenance.is_under_maintenance, aws.account.id, azure.resource.group, azure.subscription, cloud.provider, cloud.region, dt.cost.costcenter, dt.cost.product, dt.host_group.id, dt.security_context, gcp.project.id, host.name, k8s.cluster.name, k8s.cluster.uid, k8s.container.name, k8s.namespace.name, k8s.node.name, k8s.pod.name, k8s.service.name, k8s.workload.kind, k8s.workload.name

Expected behavior
I expect the dql to be:
fetch dt.davis.problems, from: now()-7d, to: now() | **filter display_id == \"P-2512155\"** | fields event.description, event.status, event.category, event.start, event.end, root_cause_entity_id, root_cause_entity_name, duration, affected_entities_count, event_count, affected_users_count, problem_id, dt.davis.mute.status, dt.davis.mute.user, entity_tags, labels.alerting_profile, maintenance.is_under_maintenance, aws.account.id, azure.resource.group, azure.subscription, cloud.provider, cloud.region, dt.cost.costcenter, dt.cost.product, dt.host_group.id, dt.security_context, gcp.project.id, host.name, k8s.cluster.name, k8s.cluster.uid, k8s.container.name, k8s.namespace.name, k8s.node.name, k8s.pod.name, k8s.service.name, k8s.workload.kind, k8s.workload.name

Screenshots

Image

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions