Dynatrace / backstage-plugin

Dynatrace Backstage Plugin
Apache License 2.0
21 stars 3 forks source link

Custom query execution - Environment limitation #132

Closed blasget closed 3 months ago

blasget commented 3 months ago

Summary

Currently, custom queries defined in the app-config.yaml or catalog-info.yaml are executed against all specified environments. However, executing a query in an environment where no results are expected can be inefficient. Therefore, it should be possible to specify the environments in which each query is executed.

Feature Suggestion

It should be possible to specify the environments in which each query defined in the app-config.yaml and catalog-info.yaml is executed.

By default, queries should be executed against all defined environments.

Possible Implementation

The configuration could look like this:

dynatrace:
  queries:
    - id: davis-events
      description: Fetches all Davis events
      environments:
        - tenant1
        - tenant2
      query: >
        fetch events | filter event.kind == "DAVIS_EVENT" | fields event.kind, timestamp

Context

Providing the ability to specify the environments in which each query defined in the app-config.yaml and catalog-info.yaml is executed.

Please use the following code-base: https://github.com/Dynatrace/backstage-plugin/pull/131