Skip to content

Commit

Permalink
Merge pull request #1727 from alex-mckay/updateDatadogDefaultFilter
Browse files Browse the repository at this point in the history
Update new FE system default filters for datadog
  • Loading branch information
Xantier authored Nov 28, 2024
2 parents a4ff422 + 4af3605 commit b54791b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-taxis-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@roadiehq/backstage-plugin-datadog': patch
---

Update default filtering to be based on required annotation for the new frontend system components
11 changes: 0 additions & 11 deletions plugins/frontend/backstage-plugin-datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,6 @@ export const app = createApp({
});
```

2. Next, enable your desired extensions in `app-config.yaml`. By default, the content and cards will only appear on entities that are components or resources. You can override that behavior by adding a config block, demonstrated on the 'datadog-graph' card.

```yaml
app:
extensions:
- entity-content:datadog/entity
- entity-card:datadog/datadog-graph:
config:
filter: kind:component,api,resource
```
## Specify datadog domain

Datadog embedded graph is using `datadoghq.eu`as default top-level domain, when other is not specified. If you are using other domain, you need to specify it with corresponding annotations `datadoghq.com/site`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react';
import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
import { isDatadogGraphAvailable } from '../plugin';

/**
* @alpha
*/
export const entityDatadogGraphCard = EntityCardBlueprint.make({
name: 'datadog-graph',
params: {
filter: 'kind:component,resource',
filter: isDatadogGraphAvailable,
loader: () =>
import('../components/GraphWidget').then(m => <m.GraphWidget />),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
convertLegacyRouteRef,
} from '@backstage/core-compat-api';
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
import { entityContentRouteRef } from '../plugin';
import { entityContentRouteRef, isDatadogDashboardAvailable } from '../plugin';
import React from 'react';

/**
Expand All @@ -14,7 +14,7 @@ export const entityDatadogContent = EntityContentBlueprint.make({
params: {
defaultPath: '/datadog',
defaultTitle: 'Datadog',
filter: 'kind:component,resource',
filter: isDatadogDashboardAvailable,
routeRef: convertLegacyRouteRef(entityContentRouteRef),
loader: () => import('../Router').then(m => compatWrapper(<m.Router />)),
},
Expand Down

0 comments on commit b54791b

Please sign in to comment.