keptn-contrib/dynatrace-service

Data explorer tile targeting a metric with no entity type defined causes an index out of range panic

arthurpitman opened this issue · 0 comments

Describe the bug
Currently the length of metricDefinition.EntityType is not checked, causing a panic if the metric definition doesn't define an entityType:

processedFilter.entitySelectorFilter = fmt.Sprintf("type(%s)", metricDefinition.EntityType[0])

One metric that causes this is builtin:security.securityProblem.open.managementZone

Versions

  • Dynatrace-service version: 0.22.0
  • Keptn version: 0.15.0

To Reproduce

  1. Create a dashboard with a Data Explorer tile targeting builtin:security.securityProblem.open.managementZone metric
  2. Retrieve SLIs using this dashboard

Expected behavior
No panic occurs