Dynatrace / Dynatrace/backstage-plugin

Filter logs by backstage.io/kubernetes-label-selector

Open
#164 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
37
Forks
19
Avg merge
4d 11h
Merged PRs (30d)
2

Description

# Summary

How can I display logs based on the backstage.io/kubernetes-label-selector annotation?

I defined this custom query in the app-config.yaml:

```
fetch logs, from: -1d
| filter backstageComponent == "$${componentNamespace}.$${componentName}"
| sort timestamp desc
| fieldsAdd content=if(isNull(content), "N/A", else: content)
| fieldsAdd source=if(isNull(log.source), "N/A", else: log.source)
| fieldsAdd host=if(isNull(host.name), "N/A", else: host.name)
| fieldsAdd environment = "$${environmentName}"
| fieldsKeep timestamp, source, content, host, environment
```

this doesn’t seem to work
`filter backstageComponent == "$${componentNamespace}.$${componentName}" `

Can you add an example in the Readme?
Also, I want to filter Davis events like this.

## Feature Suggestion

## Possible Implementation

## Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.